﻿<!-- #include file="../Include/Admin_Onlogin.asp" -->
<!-- #Include File="../../Include/Pinyin.asp" -->
<%
Data_Name = "{prefix}Channel"
strFileName = "Admin_Channel.asp"
Dim sqlAuth, rsAuth, PurviewID
sqlAuth = "Select AuthID From Admin_Auth Where href='Admin/" & strFileName & "' Order By sort Asc,AuthID Asc"
Call Exec(rsAuth,sqlAuth,2)
If rsAuth.BOF And rsAuth.EOF Then
	PurviewID = 0
Else
	PurviewID = rsAuth(0)
	CheckPurview PurviewID,0
End If
rsAuth.Close
Set rsAuth = Nothing
Select Case Action
Case "Add"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Add' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_Add()
Case "SaveAdd"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Insert' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call SaveAdd()
Case "Edit"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Edit' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,0
	Else
		CheckPurview rsAuth(0),0
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_Edit()
Case "SaveModify"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Update' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call SaveModify()
Case "Delete"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Del' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_Delete()
Case "DelHtml"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Del' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_DelHtml()
Case "Status"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/State' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_Status()
Case "Order"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Order' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_Order()
Case "ListOrder"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Order' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Call ListOrder()
Case "CreateHtml"
	sqlAuth = "Select AuthID From Admin_Auth Where pid="&PurviewID&" And href='Module/Create' Order By sort Asc,AuthID Asc"
	Call Exec(rsAuth,sqlAuth,2)
	If rsAuth.BOF And rsAuth.EOF Then
		CheckPurview 0,1
	Else
		CheckPurview rsAuth(0),1
	End If
	rsAuth.Close
	Set rsAuth = Nothing
	Channel_CreateHtml()
Case Else
	Channel_Main()
End Select
If FoundErr=True Then
	Call WriteErrMsg(ErrMsg, ComeUrl)
End If
Call CloseConn()

'//* 网站模型管理首页 *//
Sub Channel_Main()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Sql = "Select * From ["&Data_Name&"] Order By ChannelOrder Asc,ChannelID Desc"
		Call Exe_Conn(Rs,Sql,1)
		i = 0
		If Rs.BOF And Rs.EOF Then
			data = ""
		Else
			If Request("Page") <> "" Then
				CurrentPage = Code_CLng(Request("Page"))
			Else
				CurrentPage = 1
			End If
			MaxPerPage = Code_CLng(Trim(Request("limit")))
			If MaxPerPage <= 0 Then MaxPerPage = 10
			totalPut = Rs.RecordCount
			If CurrentPage < 1 Then
				CurrentPage = 1
			End If
			If (CurrentPage - 1) * MaxPerPage > totalPut Then
				If (totalPut Mod MaxPerPage) = 0 Then
					CurrentPage = totalPut \ MaxPerPage
				Else
					CurrentPage = totalPut \ MaxPerPage + 1
				End If
			End If
			If CurrentPage > 1 Then
				If (CurrentPage - 1) * MaxPerPage < totalPut Then
					Rs.Move (CurrentPage - 1) * MaxPerPage
				Else
					CurrentPage = 1
				End If
			End If
			Do While Not Rs.Eof
				iChannelID = Rs("ChannelID")
				ChannelName = ToUnicode(Rs("ChannelName"))
				ChannelDataName = Rs("ChannelDataName")
				ChannelOrder = Rs("ChannelOrder")
				Select Case Int(Rs("IsCreateHtml"))
				Case False
					IsCreateHtml = 0
				Case Else
					IsCreateHtml = 1
				End Select
				Select Case Int(Rs("ChannelHidden"))
				Case False
					ChannelHidden = 1
				Case Else
					ChannelHidden = 0
				End Select
				Select Case Int(Rs("ChannelType"))
				Case 0
					ChannelType = ToUnicode("<font class=blue>系统模型</font>")
				Case 1
					ChannelType = ToUnicode("<font class=green>克隆模型</font>")
				Case 2
					ChannelType = ToUnicode("<font class=red>外部模型</font>")
				Case Else
					ChannelType = ToUnicode("未知类型")
				End Select
				Select Case Int(Rs("ChannelType"))
				Case 2
					ChannelDir = ToUnicode("<font class=red>链接：" & Rs("LinkUrl") & "</font>")
				Case Else
					ChannelDir = ToUnicode("目录：" & Rs("ChannelDir"))
				End Select
				Select Case Int(Rs("ModuleType"))
				Case 1:ModuleType = ToUnicode("文章")
				Case 2:ModuleType = ToUnicode("图片")
				Case 3:ModuleType = ToUnicode("下载")
				Case 4:ModuleType = ToUnicode("商城")
				Case 5:ModuleType = ToUnicode("论坛")
				Case 6:ModuleType = ToUnicode("影院")
				Case 7:ModuleType = ToUnicode("市场")
				Case 8:ModuleType = ToUnicode("动画")
				Case 9:ModuleType = ToUnicode("酷站")
				Case 10:ModuleType = ToUnicode("企业")
				Case 11:ModuleType = ToUnicode("爱问")
				Case 12:ModuleType = ToUnicode("博客")
				Case 13:ModuleType = ToUnicode("招聘")
				Case Else:ModuleType = ToUnicode("自定义")
				End Select
				If i=0 Then
					data = data & "{""ChannelID"":"&iChannelID&",""ChannelName"":"""&ChannelName&""",""ChannelType"":"""&ChannelType&""",""ModuleType"":"""&ModuleType&""",""ChannelDir"":"""&ChannelDir&""",""ChannelDataName"":"""&ChannelDataName&""",""IsCreateHtml"":"&IsCreateHtml&",""ChannelHidden"":"&ChannelHidden&",""ChannelOrder"":"&ChannelOrder&"}"
				Else
					data = data & ",{""ChannelID"":"&iChannelID&",""ChannelName"":"""&ChannelName&""",""ChannelType"":"""&ChannelType&""",""ModuleType"":"""&ModuleType&""",""ChannelDir"":"""&ChannelDir&""",""ChannelDataName"":"""&ChannelDataName&""",""IsCreateHtml"":"&IsCreateHtml&",""ChannelHidden"":"&ChannelHidden&",""ChannelOrder"":"&ChannelOrder&"}"
				End If
				iCount = iCount + 1
				If iCount >= MaxPerPage Then Exit Do
				Rs.MoveNext
				i=i+1
			Loop
			Rs.Close
		End If
		If totalPut = 0 Then
			Response.Write "{""code"":201,""msg"":""\u65e0\u6570\u636e""}" & vbCrLf
		Else
			Response.Write "{""code"":0,""msg"":""\u83b7\u53d6\u6210\u529f!"",""count"":"&totalPut&",""data"":["&data&"],""rel"":1}" & vbCrLf
		End If
		Response.End()
	Else
		Response.Write "<!DOCTYPE html>" & vbCrLf
		Response.Write "<head>" & vbCrLf
		Response.Write "<title>模型管理</title>" & vbCrlf
		Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
		Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
		Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
		Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
		Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
		Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
		Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
		Response.Write "<link rel=""stylesheet"" href=""../Style/global.css"" media=""all"">" & vbCrLf
		Response.Write "<link rel=""stylesheet"" href=""../Style/font.css"" media=""all"">" & vbCrLf
		Response.Write "<script type='text/javascript'>" & vbCrLf
		Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
		Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
		Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
		Response.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
		Response.Write "</head>" & vbCrlf
		Response.Write "<body>" & vbCrlf
		Response.Write "<div class=""admin-main layui-anim layui-anim-upbit"">" & vbCrLf
		Response.Write "    <fieldset class=""layui-elem-field layui-field-title"">" & vbCrLf
		Response.Write "        <legend>模型列表</legend>" & vbCrLf
		Response.Write "    </fieldset>" & vbCrLf
		Response.Write "    <table class=""layui-table"" id=""list"" lay-filter=""list""></table>" & vbCrLf
		Response.Write "</div>" & vbCrLf
		Response.Write "<script type=""text/html"" id=""action"">" & vbCrLf
		Response.Write "    <a href=""javascript:void(0);"" onClick=""parent.tab.tabAdd({'id': 1,'href': 'Admin\/Admin_Fieldset.asp?ChannelID={{d.ChannelID}}','title': '{{d.ChannelName}}\u6a21\u578b\u5b57\u6bb5'});"" class=""layui-btn layui-btn-normal layui-btn-xs"">模型字段</a>" & vbCrLf
		Response.Write "    <a class=""layui-btn layui-btn-xs"" lay-event=""edit"">编辑</a>" & vbCrLf
		Response.Write "    {{# if(d.ChannelType!='<font class=red>外部模型</font>'){ }}" & vbCrLf
		Response.Write "    <a onclick=""parent.tab.tabAdd({'id': 1,'href': 'Admin/Admin_TempLate.asp?ChannelID={{d.ChannelID}}','title': '{{d.ChannelName}}\u6a21\u677f'});"" class=""layui-btn layui-btn-xs"">模板</a>" & vbCrLf
		Response.Write "    {{# } }}" & vbCrLf
		Response.Write "    {{# if(d.ChannelType!='<font class=blue>系统模型</font>'){ }}" & vbCrLf
		Response.Write "    <a class=""layui-btn layui-btn-danger layui-btn-xs"" lay-event=""del"">删除</a>" & vbCrLf
		Response.Write "    {{# } }}" & vbCrLf
		Response.Write "    {{# if(d.IsCreateHtml==1){ }}" & vbCrLf
		Response.Write "    <a class=""layui-btn layui-btn-danger layui-btn-xs"" lay-event=""delhtml"">Html</a>" & vbCrLf
		Response.Write "    {{# } }}" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type=""text/html"" id=""IsCreateHtml"">" & vbCrLf
		Response.Write "    {{# if(d.ChannelType!='<font class=red>外部模型</font>'){ }}" & vbCrLf
		Response.Write "    <input type=""checkbox"" name=""IsCreateHtml"" value=""{{d.ChannelID}}"" lay-skin=""switch"" lay-text=""开启|禁用"" lay-filter=""IsCreateHtml"" {{ d.IsCreateHtml == 1 ? 'checked' : '' }}>" & vbCrLf
		Response.Write "    {{# } }}" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type=""text/html"" id=""order"">" & vbCrLf
		Response.Write "    <input name=""{{d.ChannelID}}"" data-id=""{{d.ChannelID}}"" class=""list_order layui-input"" value=""{{d.ChannelOrder}}"" size=""10""/>" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type=""text/html"" id=""status"">" & vbCrLf
		Response.Write "    <input type=""checkbox"" name=""status"" value=""{{d.ChannelID}}"" lay-skin=""switch"" lay-text=""开启|禁用"" lay-filter=""status"" {{ d.ChannelHidden == 1 ? 'checked' : '' }}>" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script type=""text/html"" id=""topBtn"">" & vbCrLf
		Response.Write "    <button class=""layui-btn layui-btn-sm"" lay-event=""add""><i class=""fa fa-plus""></i> 添加模型</button>" & vbCrLf
		Response.Write "    <button class=""layui-btn layui-btn-sm"" id=""Order""><i class=""fa fa-sort-amount-asc""></i> 重新排序</button>" & vbCrlf
		Response.Write "</script>" & vbCrLf
		Response.Write "<script>" & vbCrLf
		Response.Write "    layui.use(['table','form'], function() {" & vbCrLf
		Response.Write "        var table = layui.table, form=layui.form,$ = layui.jquery;" & vbCrLf
		Response.Write "        var tableIn = table.render({" & vbCrLf
		Response.Write "            elem: '#list'," & vbCrLf
		Response.Write "            url: '?Action=Main'," & vbCrLf
		Response.Write "            method: 'post'," & vbCrLf
		Response.Write "            toolbar: '#topBtn'," & vbCrLf
		Response.Write "            autoSort: true," & vbCrLf
		Response.Write "            cellMinWidth: 80," & vbCrLf
		Response.Write "            page:true," & vbCrLf
		Response.Write "            cols: [[" & vbCrLf
		Response.Write "                {field: 'ChannelID', title: '编号', width:80, fixed: true, sort:true}," & vbCrLf
		Response.Write "                {field: 'ChannelName', title: '模型名称', width: 180}," & vbCrLf
		Response.Write "                {field: 'ChannelDataName', title: '表名', width: 180}," & vbCrLf
		Response.Write "                {field: 'ChannelType', title: '模型类型', width: 100}," & vbCrLf
		Response.Write "                {field: 'ChannelDir', title: '模型地址/目录', width: 180}," & vbCrLf
		Response.Write "                {field: 'IsCreateHtml', title: '生成html', width: 100,toolbar: '#IsCreateHtml'}," & vbCrLf
		Response.Write "                {field: 'ModuleType', title: '功能模块', width: 100}," & vbCrLf
		Response.Write "                {field: 'ChannelHidden', align: 'center',title: '状态', width: 100,toolbar: '#status', sort:true}," & vbCrLf
		Response.Write "                {field: 'ChannelOrder', title: '排序', width: 80, templet: '#order'}," & vbCrLf
		Response.Write "                {title: '操作', width: 280, align: 'center', toolbar: '#action'}" & vbCrLf
		Response.Write "            ]]" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "        //监听排序事件" & vbCrLf
		Response.Write "        table.on('sort(list)', function(obj){" & vbCrLf
		Response.Write "            table.reload('list', {" & vbCrLf
		Response.Write "                initSort: obj" & vbCrLf
		Response.Write "                ,where: {sort_by: obj.field,sort_order: obj.type}" & vbCrLf
		Response.Write "            });" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "        //头工具栏事件" & vbCrLf
		Response.Write "        table.on('toolbar(list)', function(obj){" & vbCrLf
		Response.Write "            switch(obj.event){" & vbCrLf
		Response.Write "                case 'add':" & vbCrLf
		Response.Write "                    var index = layer.open({" & vbCrLf
		Response.Write "                        type: 2," & vbCrLf
		Response.Write "                        content: '?Action=Add'," & vbCrLf
		Response.Write "                        area: ['300px', '300px']," & vbCrLf
		Response.Write "                        maxmin: true" & vbCrLf
		Response.Write "                    });" & vbCrLf
		Response.Write "                    layer.full(index);" & vbCrLf
		Response.Write "                    break;" & vbCrLf
		Response.Write "            }" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "        $('body').on('blur','.list_order',function() {" & vbCrlf
		Response.Write "            var ChannelID = $(this).attr('data-id');" & vbCrlf
		Response.Write "            var ChannelOrder = $(this).val();" & vbCrlf
		Response.Write "            var loading = layer.load(1, {shade: [0.1, '#fff']});" & vbCrlf
		Response.Write "            $.ajax({" & vbCrLf
		Response.Write "                type: 'post'," & vbCrLf
		Response.Write "                url: '?Action=ListOrder'," & vbCrLf
		Response.Write "                data: {ChannelID:ChannelID,ChannelOrder:ChannelOrder}," & vbCrLf
		Response.Write "                dataType: 'json'," & vbCrLf
		Response.Write "                success: function(res) {" & vbCrLf
		Response.Write "                    layer.close(loading);" & vbCrLf
		Response.Write "                    if (res.code == 1) {" & vbCrLf
		Response.Write "                        layer.msg(res.msg, {time: 1000, icon: 1}, function () {" & vbCrlf
		Response.Write "                            location.href = res.url;" & vbCrlf
		Response.Write "                        });" & vbCrlf
		Response.Write "                    }else{" & vbCrLf
		Response.Write "                        layer.msg(res.msg,{time:1000,icon:2});" & vbCrlf
		Response.Write "                    }" & vbCrLf
		Response.Write "                }" & vbCrLf
		Response.Write "            });" & vbCrLf
		Response.Write "        });" & vbCrlf
		Response.Write "        $('body').on('click','#Order',function() {" & vbCrlf
		Response.Write "            loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrLf
		Response.Write "            $.ajax({" & vbCrLf
		Response.Write "                type: 'post'," & vbCrLf
		Response.Write "                url: '?Action=Order'," & vbCrLf
		Response.Write "                data: {}," & vbCrLf
		Response.Write "                dataType: 'json'," & vbCrLf
		Response.Write "                success: function(res) {" & vbCrLf
		Response.Write "                    layer.close(loading);" & vbCrLf
		Response.Write "                    if (res.code == 1) {" & vbCrLf
		Response.Write "                        layer.msg(res.msg, {time: 1000, icon: 1}, function () {" & vbCrlf
		Response.Write "                            location.href = res.url;" & vbCrlf
		Response.Write "                        });" & vbCrlf
		Response.Write "                    }else{" & vbCrLf
		Response.Write "                        layer.msg(res.msg,{time:1000,icon:2});" & vbCrlf
		Response.Write "                    }" & vbCrLf
		Response.Write "                }" & vbCrLf
		Response.Write "            });" & vbCrLf
		Response.Write "        })" & vbCrlf
		Response.Write "        form.on('switch(IsCreateHtml)', function(obj){" & vbCrLf
		Response.Write "            loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrLf
		Response.Write "            var id = this.value;" & vbCrLf
		Response.Write "            var IsCreateHtml = obj.elem.checked===true?1:0;" & vbCrLf
		Response.Write "            $.ajax({" & vbCrLf
		Response.Write "                type: 'post'," & vbCrLf
		Response.Write "                url: '?Action=CreateHtml'," & vbCrLf
		Response.Write "                data: {'id':id,'IsCreateHtml':IsCreateHtml}," & vbCrLf
		Response.Write "                dataType: 'json'," & vbCrLf
		Response.Write "                success: function(res) {" & vbCrLf
		Response.Write "                    layer.close(loading);" & vbCrLf
		Response.Write "                    if (res.code==1) {" & vbCrLf
		Response.Write "                        tableIn.reload();" & vbCrLf
		Response.Write "                    }else{" & vbCrLf
		Response.Write "                        layer.msg(res.msg,{time:1000,icon:2});" & vbCrLf
		Response.Write "                        return false;" & vbCrLf
		Response.Write "                    }" & vbCrLf
		Response.Write "                }" & vbCrLf
		Response.Write "            });" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "        form.on('switch(status)', function(obj){" & vbCrLf
		Response.Write "            loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrLf
		Response.Write "            var id = this.value;" & vbCrLf
		Response.Write "            var status = obj.elem.checked===true?1:0;" & vbCrLf
		Response.Write "            $.ajax({" & vbCrLf
		Response.Write "                type: 'post'," & vbCrLf
		Response.Write "                url: '?Action=Status'," & vbCrLf
		Response.Write "                data: {'id':id,'status':status}," & vbCrLf
		Response.Write "                dataType: 'json'," & vbCrLf
		Response.Write "                success: function(res) {" & vbCrLf
		Response.Write "                    layer.close(loading);" & vbCrLf
		Response.Write "                    if (res.code==1) {" & vbCrLf
		Response.Write "                        tableIn.reload();" & vbCrLf
		Response.Write "                    }else{" & vbCrLf
		Response.Write "                        layer.msg(res.msg,{time:1000,icon:2});" & vbCrLf
		Response.Write "                        return false;" & vbCrLf
		Response.Write "                    }" & vbCrLf
		Response.Write "                }" & vbCrLf
		Response.Write "            });" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "        table.on('tool(list)', function(obj) {" & vbCrLf
		Response.Write "            var data = obj.data;" & vbCrLf
		Response.Write "            var id = data.ChannelID;" & vbCrLf
		Response.Write "            if(obj.event === 'del'){" & vbCrLf
		Response.Write "                layer.confirm('你确定要删除该模型吗？', {icon: 3}, function (index) {" & vbCrLf
		Response.Write "                    $.ajax({" & vbCrLf
		Response.Write "                        type: 'post'," & vbCrLf
		Response.Write "                        url: '?Action=Delete'," & vbCrLf
		Response.Write "                        data: {id:data.ChannelID}," & vbCrLf
		Response.Write "                        dataType: 'json'," & vbCrLf
		Response.Write "                        success: function(res) {" & vbCrLf
		Response.Write "                            if (res.code==1) {" & vbCrLf
		Response.Write "                                layer.msg(res.msg,{time:1000,icon:1});" & vbCrLf
		Response.Write "                                tableIn.reload();" & vbCrLf
		Response.Write "                            }else{" & vbCrLf
		Response.Write "                                layer.msg(res.msg,{time:1000,icon:2});" & vbCrLf
		Response.Write "                            }" & vbCrLf
		Response.Write "                        }" & vbCrLf
		Response.Write "                    });" & vbCrLf
		Response.Write "                    layer.close(index);" & vbCrLf
		Response.Write "                });" & vbCrLf
		Response.Write "            }else if(obj.event === 'delhtml'){" & vbCrLf
		Response.Write "                layer.confirm('你确定要删除该模型首页Html文件吗？', {icon: 3}, function (index) {" & vbCrLf
		Response.Write "                    $.ajax({" & vbCrLf
		Response.Write "                        type: 'post'," & vbCrLf
		Response.Write "                        url: '?Action=DelHtml'," & vbCrLf
		Response.Write "                        data: {id:data.ChannelID}," & vbCrLf
		Response.Write "                        dataType: 'json'," & vbCrLf
		Response.Write "                        success: function(res) {" & vbCrLf
		Response.Write "                            if (res.code==1) {" & vbCrLf
		Response.Write "                                layer.msg(res.msg,{time:1000,icon:1});" & vbCrLf
		Response.Write "                                tableIn.reload();" & vbCrLf
		Response.Write "                            }else{" & vbCrLf
		Response.Write "                                layer.msg(res.msg,{time:1000,icon:2});" & vbCrLf
		Response.Write "                            }" & vbCrLf
		Response.Write "                        }" & vbCrLf
		Response.Write "                    });" & vbCrLf
		Response.Write "                    layer.close(index);" & vbCrLf
		Response.Write "                });" & vbCrLf
		Response.Write "            }else if(obj.event === 'edit'){" & vbCrLf
		Response.Write "                var index = layer.open({" & vbCrLf
		Response.Write "                    type: 2," & vbCrLf
		Response.Write "                    content: '?Action=Edit&iChannelID='+id," & vbCrLf
		Response.Write "                    area: ['300px', '300px']," & vbCrLf
		Response.Write "                    maxmin: true" & vbCrLf
		Response.Write "                });" & vbCrLf
		Response.Write "                layer.full(index);" & vbCrLf
		Response.Write "            }" & vbCrLf
		Response.Write "        });" & vbCrLf
		Response.Write "    })" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write "</body>" & vbCrLf & "</html>"
	End If
End Sub

'//* 模型编辑 *//
Sub Channel_Edit()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>模型管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Dim iChannelID, ChannelName, ChannelPicUrl, ChannelRemark, ChannelColor, ChannelBold, ChannelOpenType, ChannelHidden, ChannelType
	Dim LinkUrl, ModuleType, ChannelDir, ChannelTit, ChannelUnit, ChannelListNum, ShowName, ChannelSetup, Moban, SkinID, TemplateID
	Dim ChannelLeftCuteNum, ChannelCuteNum,ChannelReward,ChannelDates
	Dim ClassDepth, ChannelPosition
	Dim UploadType, UploadDir, MaxFileSize, UpFileType
	Dim PicHeight, PicWidth, RssField
	Dim Sii, UpFileTypes, ChannelListNums, ChannelPositions, ChannelCuteNums,ChannelRewards,ChannelDatess
	Dim ChannelPower,j,Tmp1
	Dim ChannelPHidden,i,Tmp2,IsChangeCreateHtml
	Dim IsCreateHtml, HtmlExtName, HtmlPrefix, HtmlPath , HtmlForm, tempstr

	iChannelID = Code_CLng(Trim(Request("iChannelID")))
	Call Exec(Rs,"Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
	If Rs.Eof Then
		Rs.Close
		Response.Write IsSuccess("模型ID（"&iChannelID&"）不存在！",AdminFolder & "/Admin/"&strFileName)
		Exit Sub
	End If
	ChannelName = Code_Html(Rs("ChannelName"),1,0)
	ChannelPicUrl = Rs("ChannelPicUrl")
	ChannelRemark = Code_Html(Rs("ChannelRemark"),1,0)
	ChannelColor = Rs("ChannelColor")
	ChannelBold = Rs("ChannelBold")
	ChannelOpenType = Rs("ChannelOpenType")
	ChannelHidden = CBool(Rs("ChannelHidden"))
	ChannelType = Int(Rs("ChannelType"))
	LinkUrl = Rs("LinkUrl")
	ModuleType = int(Rs("ModuleType"))
	ChannelDir = Rs("ChannelDir")
	ChannelTit = Rs("ChannelTit")
	ChannelUnit = Rs("ChannelUnit")
	ChannelListNum = Rs("ChannelListNum")
	ChannelCuteNum = Rs("CuteNum")
	ChannelReward= Rs("ChannelReward")
	ChannelDates= Rs("ChannelDates")
	ChannelLeftCuteNum = Int(Rs("LeftCuteNum"))
	ShowName = Int(Rs("ShowName"))
	ChannelSetup = Rs("ChannelSetup")
	ClassDepth = Rs("ClassDepth")
	ChannelPosition = Rs("ChannelPosition")
	UploadType = Rs("UploadType")
	PicHeight = Rs("PicHeight")
	RssField = Rs("RssField")
	PicWidth = Rs("PicWidth")
	UploadDir = Rs("UploadDir")
	MaxFileSize = Int(Rs("MaxFileSize"))
	UpFileType = Rs("UpFileType")
	ChannelPower = Rs("ChannelPower")
	ChannelPHidden = Rs("ChannelPHidden")
	IsCreateHtml = Rs("IsCreateHtml")
	HtmlExtName = Rs("HtmlExtName")
	HtmlPrefix = Rs("HtmlPrefix")
	HtmlPath = Rs("HtmlPath")
	HtmlForm = Rs("HtmlForm")
	Moban = Rs("Moban")
	SkinID = Rs("SkinID")
	TemplateID = Rs("TemplateID")
	Rs.Close
	tempstr = HtmlRndFileName
	Response.Write "<form class=""layui-form layui-form-pane"" id=""myform"" name=""myform"" action='?Action=SaveModify&iChannelID=" & iChannelID & "' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "<legend>编辑模型（" & ChannelName & "）</legend>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型名称：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input name=""ChannelName"" type=""text"" id=""ChannelName"" size=""30"" maxlength=""30"" value=""" & Code_Html(ChannelName,1,0) & """ lay-verify=""required"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux red"">*</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">打开方式：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type=""radio"" id=""ChannelOpenType"" name=""ChannelOpenType"" value=""no"" title=""原窗口"""
	If ChannelOpenType = False Then Response.Write " checked"
	Response.Write "><input id=""ChannelOpenType"" name=""ChannelOpenType"" type=""radio"" value=""yes"" title=""新窗口"""
	If ChannelOpenType = True Then Response.Write " checked"
	Response.Write ">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">禁用模型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelHidden' name='ChannelHidden' value='yes' title=""是"""
	If ChannelHidden = True Then Response.Write " checked"
	Response.Write "><input type='radio' id='ChannelHidden' name='ChannelHidden' value='no' title=""否"""
	If ChannelHidden = False Then Response.Write " checked"
	Response.Write ">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">默认模板：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='text' id='Moban' name='Moban' value='" & Moban & "' size='40' maxlength='255' class=""layui-input"" readonly=""readonly"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-input-block"">" & vbCrlf
	Response.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectMoban('" & iChannelID & "','Moban');"">选择模板</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('Moban');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">默认风格：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='text' id='SkinID' name='SkinID' value='" & SkinID & "' size='40' maxlength='255' class=""layui-input"" readonly=""readonly"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-input-block"">" & vbCrlf
	Response.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectCss('SkinID');"">选择风格</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('SkinID');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	'Response.Write "<div class=""layui-form-item"">" & vbCrlf
	'Response.Write "<label class=""layui-form-label"">默认框架：</label>" & vbCrlf
	'Response.Write "<div class=""layui-input-block"">" & vbCrlf
	'Response.Write "" & Admin_ShowTemplate_Option(TemplateID,"TemplateID",1,iChannelID) & "" & vbCrlf
	'Response.Write "</div>" & vbCrlf
	'Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型类型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	If ChannelType = 2 Then
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend><input id=""ChannelType"" name=""ChannelType"" type=""radio"" value='2' title='<font color=blue>外部模型</font>'"
		If ChannelType = 2 Then Response.Write " checked"
		Response.Write "></legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		Response.Write "外部模型指链接到本系统以外的地址中。当此模型准备链接到网站中的其他系统时，请使用这种方式。<br><label class=""layui-form-label"">链接地址：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-block"">" & vbCrlf
		Response.Write "<input name='LinkUrl' id='LinkUrl' type='text' value='" & LinkUrl & "' size='40' maxlength='200' lay-verify=""LinkUrl"" class='layui-input'>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
	Else
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend><input id=""ChannelType"" name=""ChannelType"" type=""radio"" value='" & ChannelType & "' title='<font color=blue>系统内部模型</font>'"
		If ChannelType = 1 Or ChannelType = 0 Then Response.Write " checked"
		Response.Write "></legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		Response.Write "系统内部模型指的是在本系统现有功能模块（新闻、文章、下载等）基础上添加新的模型，新模型具备和所使用功能模块完全相同的功能。此功能需要服务器支持FSO才可用。" & vbCrlf
		Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
		Response.Write "<legend>内部模型参数设置</legend>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">功能模块：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<div id=""ModuleType_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:80px;""><input type=""text"" ztype=""select"" id=""ModuleType"" name=""ModuleType"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:80px;position:absolute;z-index:-1;"" value=""" & ModuleType & """ startvalue=""" & ModuleType & """ disabled/><input type=""text"" id=""ModuleType_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:80px;"" /><a id=""ModuleType_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""ModuleType_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""ModuleType_ul"" style=""left:-1px; width:-1px;""><script>Combox_ModuleType_Init=function(){var _el=Zving.getDom('ModuleType');if(_el._components){return true;}var  _data=[];var  _DataSource;"
		Response.Write "_data.push(['0','自定义']);"
		Response.Write "_data.push(['1','文章']);"
		Response.Write "_data.push(['2','图片']);"
		Response.Write "_data.push(['3','下载']);"
		Response.Write "_data.push(['4','商城']);"
		Response.Write "_data.push(['5','论坛']);"
		Response.Write "_data.push(['6','影院']);"
		Response.Write "_data.push(['7','市场']);"
		Response.Write "_data.push(['8','动画']);"
		Response.Write "_data.push(['9','酷站']);"
		Response.Write "_data.push(['10','企业']);"
		Response.Write "_data.push(['11','爱问']);"
		Response.Write "_data.push(['12','博客']);"
		Response.Write "_data.push(['13','招聘']);"
		Response.Write "var combox_ModuleType = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_ModuleType_Init();}else{Zving.Page.onReady(Combox_ModuleType_Init);}</script></div></div></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">模型目录：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelDir' name='ChannelDir' type='text' value='" & ChannelDir & "' size='20' maxlength='50' disabled class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>只能是英文，不能带空格或“\”、“/”等符号。</font><br><font class=blue>样例：</font>Article、Photo、Down</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">模型简称：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelTit' name='ChannelTit' value='" & ChannelTit & "' type='text' size='20' maxlength='10' lay-verify=""ChannelTit"" class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux"">例：“文章”或“教程”</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">项目单位：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelUnit' name='ChannelUnit' value='" & ChannelUnit & "' type='text' size='10' maxlength='30' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>例如：“篇”、“条”、“个”</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
		Response.Write "<legend>内部模型其他参数</legend>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<font class=red>以下设置不是每个模型都需要的，请谨慎选择配置。比如“文章”不使用下列某些参数。</font>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend>模型调用数量：</legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		If ChannelListNum = "" Then ChannelListNum = "@@@@@@@@@@@@@@@@@@@@@"
		ChannelListNum = Split(ChannelListNum,"@@@")
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">首页显示数</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='" & ChannelListNum(0) & "' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">分页显示数</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='" & ChannelListNum(1) & "' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">RSS显示数</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='" & ChannelListNum(2) & "' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Erase ChannelListNum
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend>列表截断字符数：</legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">左边信息：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelLeftCuteNum' name='ChannelLeftCuteNum' value='" & ChannelLeftCuteNum & "' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		If ChannelCuteNum = "" Then ChannelCuteNum = "@@@@@@@@@@@@@@@@@@"
		ChannelCuteNum = Split(ChannelCuteNum,"@@@")
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">首页信息：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='" & ChannelCuteNum(0) & "' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">分页列表</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='" & ChannelCuteNum(1) & "' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">内容页信息</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='" & ChannelCuteNum(2) & "' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Erase ChannelCuteNum
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend>图片大小（宽高）：</legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">宽度：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='PicWidth' name='PicWidth' value='" & PicWidth & "' type=number min=""1"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux"">像素</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">高度：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='PicHeight' name='PicHeight' value='" & PicHeight & "' type=number min=""1"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux"">像素</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">评论功能：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input type=""radio"" id=""ChannelSetup_2"" name=""ChannelSetup_2"" value='1' title='是'"
		If Get_ChannelSetup(ChannelSetup,2) = 1 Then Response.Write " checked"
		Response.Write "><input type=""radio"" id=""ChannelSetup_2"" name=""ChannelSetup_2"" value='0' title='否'"
		If Get_ChannelSetup(ChannelSetup,2) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">Rss功能：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input type=""radio"" id=""ChannelSetup_6"" name=""ChannelSetup_6"" value='1' title='是' lay-filter='ChannelSetup_6'"
		If Get_ChannelSetup(ChannelSetup,6) = 1 Then Response.Write " checked"
		Response.Write " onClick=""RssFields.style.display=''""><input type=""radio"" id=""ChannelSetup_6"" name=""ChannelSetup_6"" value='0' title='否' lay-filter='ChannelSetup_6'"
		If Get_ChannelSetup(ChannelSetup,6) = 0 Then Response.Write " checked"
		Response.Write " onClick=""RssFields.style.display='none'"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"" id='RssFields'"
		If Get_ChannelSetup(ChannelSetup,6) = 0 Then Response.Write " style='display:none;'"
		Response.Write ">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">Rss字段：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='RssField' name='RssField' type='text' value='" & RssField & "' size=30 maxlength='50' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">不健康字符</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_8' name='ChannelSetup_8' value='1' title='是'"
		If Get_ChannelSetup(ChannelSetup,8) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_8' name='ChannelSetup_8' value='0' title='否'"
		If Get_ChannelSetup(ChannelSetup,8) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">生成HTML</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input type=""radio"" id=""IsCreateHtml"" name=""IsCreateHtml"" value=""0"" title=""不生成"" lay-filter='IsCreateHtml'"
		If IsCreateHtml = 0 Then Response.Write " checked"
		Response.Write " onClick=""DisPlayHtml()""><input type=""radio"" id=""IsCreateHtml"" name=""IsCreateHtml"" value=""1"" title=""生成"" lay-filter='IsCreateHtml'"
		If IsCreateHtml <> 0 Then Response.Write " checked"
		Response.Write " onClick=""DisPlayHtml2()"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"" id=""HtmlTrue1"""
		If IsCreateHtml = 0 Then Response.Write " style='display:none'"
		Response.Write ">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">扩展名：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type=""text"" id=""HtmlExtName"" name=""HtmlExtName"" size=""10"" value=""" & HtmlExtName & """ class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>* 如：“.html”，“.htm”，“.shtml”，“.asp”</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"" id=""HtmlTrue2"""
		If IsCreateHtml = 0 Then Response.Write " style='display:none'"
		Response.Write ">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">前缀：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type=""text"" id=""HtmlPrefix"" name=""HtmlPrefix"" size=""10"" value=""" & HtmlPrefix & """ class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>* 格式如：“Article_12345.html”，“Article_list123_1.html”</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"" id=""HtmlTrue3"""
		If IsCreateHtml = 0 Then Response.Write " style='display:none'"
		Response.Write ">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">路径格式：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<div id=""HtmlPath_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:120px;""><input type=""text"" ztype=""select"" id=""HtmlPath"" name=""HtmlPath"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:120px;position:absolute;z-index:-1;"" onchange=""chkselect(options[selectedIndex].value,'know2');"" value=""" & HtmlPath & """ startvalue=""" & HtmlPath & """/><input type=""text"" id=""HtmlPath_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:120px;"" /><a id=""HtmlPath_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""HtmlPath_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""HtmlPath_ul"" style=""left:-1px; width:-1px;""><script>Combox_HtmlPath_Init=function(){var _el=Zving.getDom('HtmlPath');if(_el._components){return true;}var  _data=[];var  _DataSource;"
		Response.Write "_data.push(['0','不使用日期目录']);"
		Response.Write "_data.push(['1','" & ShowDatePath(tempstr,1) & "']);"
		Response.Write "_data.push(['2','" & ShowDatePath(tempstr,2) & "']);"
		Response.Write "_data.push(['3','" & ShowDatePath(tempstr,3) & "']);"
		Response.Write "_data.push(['4','" & ShowDatePath(tempstr,4) & "']);"
		Response.Write "_data.push(['5','" & ShowDatePath(tempstr,5) & "']);"
		Response.Write "_data.push(['6','" & ShowDatePath(tempstr,6) & "']);"
		Response.Write "_data.push(['7','" & ShowDatePath(tempstr,7) & "']);"
		Response.Write "_data.push(['8','" & ShowDatePath(tempstr,8) & "']);"
		Response.Write "var combox_HtmlPath = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_HtmlPath_Init();}else{Zving.Page.onReady(Combox_HtmlPath_Init);}</script></div></div></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>此目录是根据添加内容的日期生成，相对于各栏目目录下面</font><div id=""know2"" style=""color: red;font-weight:bold;"">"
		If HtmlPath = 0 Then
			Response.Write "不使用日期目录,HTML文件将保存到栏目目录下面<br>" & InstallDir&ChannelName & "/栏目目录/" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 1 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,1) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 2 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,2) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 3 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,3) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 4 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,4) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 5 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,5) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 6 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,6) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 7 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,7) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		ElseIf HtmlPath = 8 Then
			Response.Write InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,8) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		Else
			Response.Write "不使用日期目录,HTML文件将保存到栏目目录下面<br>" & InstallDir&ChannelName & "/栏目目录/" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"")
		End If
		Response.Write "</div></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"" id=""HtmlTrue4"""
		If IsCreateHtml = 0 Then Response.Write " style='display:none'"
		Response.Write ">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">格式：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<div id=""HtmlForm_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:120px;""><input type=""text"" ztype=""select"" id=""HtmlForm"" name=""HtmlForm"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:120px;position:absolute;z-index:-1;"" onchange=""chkselect(options[selectedIndex].value,'know1');"" value=""" & HtmlForm & """ startvalue=""" & HtmlForm & """/><input type=""text"" id=""HtmlForm_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:120px;"" /><a id=""HtmlForm_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""HtmlForm_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""HtmlForm_ul"" style=""left:-1px; width:-1px;""><script>Combox_HtmlForm_Init=function(){var _el=Zving.getDom('HtmlForm');if(_el._components){return true;}var  _data=[];var  _DataSource;"
		Response.Write "_data.push(['0','日期和时间']);"
		Response.Write "_data.push(['1','" & ChannelTit & "ID']);"
		Response.Write "_data.push(['2','文件前缀+" & ChannelTit & "ID']);"
		Response.Write "_data.push(['3','日期+" & ChannelTit & "ID']);"
		Response.Write "_data.push(['4','随机数+" & ChannelTit & "ID']);"
		Response.Write "var combox_HtmlForm = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_HtmlForm_Init();}else{Zving.Page.onReady(Combox_HtmlForm_Init);}</script></div></div></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><div id=""know1"" style=""color: red;font-weight:bold;"">"
		If HtmlForm = 0 Then
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,0,"")
		ElseIf HtmlForm = 1 Then
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,1,"")
		ElseIf HtmlForm = 2 Then
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,2,"")
		ElseIf HtmlForm = 3 Then
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,3,"")
		ElseIf HtmlForm = 4 Then
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,4,"")
		Else
			Response.Write ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,0,"")
		End If
		Response.Write "</div></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div id=""Issubport0"" style=""display:none"">" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,0,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport1"" style=""display:none"">" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,1,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport2"" style=""display:none"">" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,2,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport3"" style=""display:none"">" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,3,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport4"" style=""display:none"">" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,4,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport5"" style=""display:none"">不使用日期目录,HTML文件将保存到栏目目录下面<br>" & InstallDir&ChannelName & "/栏目目录/" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport6"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,1) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport7"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,2) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport8"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,3) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport9"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,4) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport10"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,5) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport11"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,6) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport12"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,7) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<div id=""Issubport13"" style=""display:none"">" & InstallDir & "" & ChannelName & "/栏目目录/" & ShowDatePath(tempstr,8) & "" & ReadFileName(tempstr,9988,HtmlExtName,HtmlPrefix,HtmlForm,"") & "</div>" & vbCrlf
		Response.Write "<script language=""javascript"" type=""text/javascript"">" & vbCrlf
		Response.Write "<!--" & vbCrlf
		Response.Write "function chkselect(s,divid)" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "var divname='Issubport';" & vbCrlf
		Response.Write "var chkreport;" & vbCrlf
		Response.Write "s=Number(s)" & vbCrlf
		Response.Write "if (divid==""know1"")" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "divname=divname+s;" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "if (divid==""know2"")" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "s+=5;" & vbCrlf
		Response.Write "divname=divname+s;" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "document.getElementById(divid).innerHTML=divname;" & vbCrlf
		Response.Write "chkreport=document.getElementById(divname).innerHTML;" & vbCrlf
		Response.Write "document.getElementById(divid).innerHTML=chkreport;" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "function DisPlayHtml()" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "HtmlTrue1.style.display='none'" & vbCrlf
		Response.Write "HtmlTrue2.style.display='none'" & vbCrlf
		Response.Write "HtmlTrue3.style.display='none'" & vbCrlf
		Response.Write "HtmlTrue4.style.display='none'" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "function DisPlayHtml2()" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "HtmlTrue1.style.display=''" & vbCrlf
		Response.Write "HtmlTrue2.style.display=''" & vbCrlf
		Response.Write "HtmlTrue3.style.display=''" & vbCrlf
		Response.Write "HtmlTrue4.style.display=''" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write vbCrlf
		Response.Write "function DisPlayUpload()" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "UploadTrue1.style.display='none'" & vbCrlf
		Response.Write "UploadTrue2.style.display='none'" & vbCrlf
		Response.Write "UploadTrue3.style.display='none'" & vbCrlf
		Response.Write "UploadTrue4.style.display='none'" & vbCrlf
		Response.Write "UploadTrue5.style.display='none'" & vbCrlf
		Response.Write "UploadTrue6.style.display='none'" & vbCrlf
		Response.Write "UploadTrue7.style.display='none'" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "function DisPlayUpload2()" & vbCrlf
		Response.Write "{" & vbCrlf
		Response.Write "UploadTrue1.style.display=''" & vbCrlf
		Response.Write "UploadTrue2.style.display=''" & vbCrlf
		Response.Write "UploadTrue3.style.display=''" & vbCrlf
		Response.Write "UploadTrue4.style.display=''" & vbCrlf
		Response.Write "UploadTrue5.style.display=''" & vbCrlf
		Response.Write "UploadTrue6.style.display=''" & vbCrlf
		Response.Write "UploadTrue7.style.display=''" & vbCrlf
		Response.Write "}" & vbCrlf
		Response.Write "//-->" & vbCrlf
		Response.Write "</script>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">上传限制：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UploadType' name='UploadType' type='radio' value='0' title=""关闭"" lay-filter='UploadType'"
		If UploadType = 0 Then Response.Write " checked"
		Response.Write " onClick=""UploadTrue.style.display='none'""><input type='radio' id='UploadType' name='UploadType' value='1' title=""开启"" lay-filter='UploadType'"
		If UploadType = 1 Then Response.Write " checked"
		Response.Write " onClick=""UploadTrue.style.display=''"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field"" id='UploadTrue'"
		If UploadType = 0 Then Response.Write " style='display:none'"
		Response.Write ">" & vbCrlf
		Response.Write "<legend>上传限制：</legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">保存目录：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UploadDir' name='UploadDir' type='text' value='" & UploadDir & "' size='20' maxlength=20 class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">水印功能：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_11' name='ChannelSetup_11' value='1' title=""是"""
		If Get_ChannelSetup(ChannelSetup,11) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_11' name='ChannelSetup_11' value='0' title=""否"""
		If Get_ChannelSetup(ChannelSetup,11) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">远程图片：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_12' name='ChannelSetup_12' value='1' title=""是"""
		If Get_ChannelSetup(ChannelSetup,12) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_12' name='ChannelSetup_12' value='0' title=""否"""
		If Get_ChannelSetup(ChannelSetup,12) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>仅限 HTML 编辑时使用</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">首张图片：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_17' name='ChannelSetup_17' value='1' title=""是"""
		If Get_ChannelSetup(ChannelSetup,17) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_17' name='ChannelSetup_17' value='0' title=""否"""
		If Get_ChannelSetup(ChannelSetup,17) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>仅限 HTML 编辑时使用</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">命名形式：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_15' name='ChannelSetup_15' value='1' title=""重命名"""
		If Get_ChannelSetup(ChannelSetup,15) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_15' name='ChannelSetup_15' value='0' title=""原名"""
		If Get_ChannelSetup(ChannelSetup,15) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>重命名则按年月日时分秒+随机数命名。</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">自动目录：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input type='radio' id='ChannelSetup_16' name='ChannelSetup_16' value='1' title=""使用"""
		If Get_ChannelSetup(ChannelSetup,16) = 1 Then Response.Write " checked"
		Response.Write "><input type='radio' id='ChannelSetup_16' name='ChannelSetup_16' value='0' title=""不使用"""
		If Get_ChannelSetup(ChannelSetup,16) = 0 Then Response.Write " checked"
		Response.Write ">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>如使用则按“年月日”栏目，需FSO支持。</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<div class=""layui-inline"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">文件大小：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-inline"">" & vbCrlf
		Response.Write "<input id='MaxFileSize' name='MaxFileSize' type='text' value='" & MaxFileSize & "' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-input-t layui-word-aux"">" & vbCrlf
		Response.Write "KB" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>提示：1 KB = 1024 Byte，1 MB = 1024 KB</font></div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
		Response.Write "<legend>文件类型：</legend>" & vbCrlf
		Response.Write "<div class=""layui-field-box"">" & vbCrlf
		If UpFileType = "" Then UpFileType = "@@@@@@@@@@@@"
		UpFileType = Split(UpFileType,"@@@")
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">图片类型：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='" & UpFileType(0) & "' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">Flash文件：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='" & UpFileType(1) & "' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">多媒体文件</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='" & UpFileType(2) & "' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">其他文件：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='" & UpFileType(3) & "' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "<div class=""layui-form-item"">" & vbCrlf
		Response.Write "<label class=""layui-form-label"">远程类型：</label>" & vbCrlf
		Response.Write "<div class=""layui-input-4"">" & vbCrlf
		Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='" & UpFileType(4) & "' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Erase UpFileType
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</div>" & vbCrlf
		Response.Write "</fieldset>" & vbCrlf
	End If
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<input name=""iChannelID"" type=""hidden"" id=""iChannelID"" value=""" & iChannelID & """><input name=""ModuleType"" type=""hidden"" id=""ModuleType"" value=""" & ModuleType & """>" & Submit_Layui("提交修改","重新填写","确认要清空对话框内容？","var index=parent.layer.getFrameIndex(window.name);parent.layer.close(index);","关闭","") & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //自定义表单验证" & vbCrlf
	Response.Write "    form.verify({" & vbCrlf
	Response.Write "        ChannelTit: function (value, item) {" & vbCrlf
 	Response.Write "            if($(""input:radio[name='ChannelType']:checked"").val()==1) {" & vbCrlf
	Response.Write "                if (!value){" & vbCrlf
	Response.Write "                    item.focus();" & vbCrlf
	Response.Write "                    return ""频道简称不能为空！"";" & vbCrlf
 	Response.Write "                }" & vbCrlf
 	Response.Write "            }" & vbCrlf
	Response.Write "        }," & vbCrlf
	Response.Write "        LinkUrl: function (value, item) {" & vbCrlf
 	Response.Write "            if($(""input:radio[name='ChannelType']:checked"").val()==2) {" & vbCrlf
	Response.Write "                if (!value){" & vbCrlf
	Response.Write "                    item.focus();" & vbCrlf
	Response.Write "                    return ""链接地址不能为空！"";" & vbCrlf
 	Response.Write "                }" & vbCrlf
 	Response.Write "            }" & vbCrlf
	Response.Write "        }," & vbCrlf
	Response.Write "    })" & vbCrLf
	Response.Write "    //监听 Rss功能" & vbCrlf
	Response.Write "    form.on('radio(ChannelSetup_6)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            RssFields.style.display='';" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            RssFields.style.display='none';" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //监听 生成HTML" & vbCrlf
	Response.Write "    form.on('radio(IsCreateHtml)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            DisPlayHtml2();" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            DisPlayHtml();" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //监听 上传限制" & vbCrlf
	Response.Write "    form.on('radio(UploadType)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            UploadTrue.style.display='';" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            UploadTrue.style.display='none';" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=SaveModify'," & vbCrLf
	Response.Write "            data: $(data.form).serialize()," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        layer.closeAll(""iframe"");" & vbCrlf
	Response.Write "                        //刷新父页面" & vbCrlf
	Response.Write "                        parent.location.reload();" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub SaveModify()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim iChannelID, ChannelName, ChannelPicUrl, ChannelRemark, ChannelColor, ChannelBold, ChannelOpenType, ChannelHidden, ChannelType
		Dim LinkUrl, ModuleType, ChannelDir, ChannelTit, ChannelUnit, ChannelListNum, ShowName, ChannelSetup, Moban, SkinID, TemplateID
		Dim ChannelLeftCuteNum, ChannelCuteNum,ChannelReward,ChannelDates
		Dim ClassDepth, ChannelPosition
		Dim UploadType, UploadDir, MaxFileSize, UpFileType
		Dim PicHeight, PicWidth, RssField
		Dim Sii, UpFileTypes, ChannelListNums, ChannelPositions, ChannelCuteNums,ChannelRewards,ChannelDatess
		Dim ChannelPower,j,Tmp1
		Dim ChannelPHidden,i,Tmp2,IsChangeCreateHtml
		Dim IsCreateHtml, HtmlExtName, HtmlPrefix, HtmlPath , HtmlForm, tempstr

		iChannelID = Trim(Request.Form("iChannelID"))
		Call Exec(Rs,"Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
		If Rs.Eof Then
			Rs.Close
			Response.Write "{""code"":0,""msg"":""\u9891\u9053ID\uff08"&iChannelID&"\uff09\u4e0d\u5b58\u5728\uff01""}" & vbCrLf
			Response.End()
		End If
		ChannelSetup = ""
		UpFileType = ""
		ChannelListNum = ""
		ChannelPosition = ""
		ChannelCuteNum = ""
		ChannelReward = ""
		ChannelDates = ""
		ChannelPower = ""
		ChannelPHidden = ""
		ChannelName = Code_Admin("ChannelName",1,20)
		If ChannelName = "" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u586b\u5199\u9891\u9053\u540d\u79f0\uff01""}" & vbCrLf
			Response.End()
		End If
		ChannelPicUrl = Code_Admin("ChannelPicUrl",1,200)
		ChannelRemark = Code_Admin("ChannelRemark",1,200)
		ChannelColor = Code_Admin("ChannelColor",1,6)
		If ChannelColor <> "" And Len(ChannelColor) <> 6 Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6b63\u786e\u586b\u5199\u83dc\u5355\u663e\u793a\u989c\u8272\uff0c\u53ea\u80fd\u4e3a6\u4f4d\u6570 RGB \u989c\u8272\u4ee3\u7801\uff01""}" & vbCrLf
			Response.End()
		End If
		ChannelBold = False
		If Code_Form("ChannelBold") = "yes" Then ChannelBold = True
		ChannelOpenType = False
		If Code_Form("ChannelOpenType") = "yes" Then ChannelOpenType = True
		ChannelHidden = False
		If Code_Form("ChannelHidden") = "yes" Then ChannelHidden = True
		ChannelType = Code_Int("ChannelType",1)
		ModuleType = Trim(Code_Form("ModuleType"))

		If ChannelType = 2 Then
			LinkUrl = Code_Admin("LinkUrl",1,200)
			If LinkUrl = "" Then
				Response.Write "{""code"":0,""msg"":""\u5916\u90e8\u9891\u9053\u8bf7\u586b\u5199\u94fe\u63a5\u5730\u5740\uff01""}" & vbCrLf
				Response.End()
			End If
			If FoundErr = True Then
				Exit Sub
			End If
			Sql = "Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID
			Call Exe_Conn(Rs,Sql,3)
				Rs("ChannelName") = ChannelName
				Rs("ChannelPicUrl") = ChannelPicUrl
				Rs("ChannelRemark") = ChannelRemark
				Rs("ChannelColor") = ChannelColor
				Rs("ChannelBold") = ChannelBold
				Rs("ChannelOpenType") = ChannelOpenType
				Rs("ChannelHidden") = ChannelHidden
				Rs("ChannelType") = ChannelType
				Rs("LinkUrl") = LinkUrl
			Rs.Update
			Rs.Close
			'Response.Write IsConfirm("成功编辑一个外部模型！请点击确定，需要继续修改点击取消！",AdminFolder & "/Admin/"&strFileName,AdminFolder & "/Admin/" & strFileName & "?Action=Edit&iChannelID="&iChannelID&"")
			Response.Write "{""code"":1,""msg"":""\u6210\u529f\u7f16\u8f91\u4e00\u4e2a\u5916\u90e8\u9891\u9053\uff01"",""url"":""?""}" & vbCrLf
			Response.End()
		Else
			ChannelTit = Code_Admin("ChannelTit",1,10)
			If ChannelTit = "" Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u7b80\u79f0\u5fc5\u987b\u586b\u5199\uff01""}" & vbCrLf
				Response.End()
			End If
			Moban=Trim(Request.Form("Moban"))
			SkinID=Trim(Request.Form("SkinID"))
			TemplateID=Trim(Request.Form("TemplateID"))
			If TemplateID = "" Then TemplateID = 0
			ChannelUnit = Code_Admin("ChannelUnit",1,20)
			ChannelLeftCuteNum = Code_Int("ChannelLeftCuteNum",15)
			ShowName = False
			If Code_Form("ShowName") = "yes" Then ShowName = True
			ClassDepth = Code_Int("ClassDepth",0)
			RssField = Code_Admin("RssField",1,50)
			If RssField = "" And Code_Int("ChannelSetup_6",0) = 1 Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u652f\u6301 RSS \u65f6\uff0c\u9700\u8981\u586b\u5199 Rss \u5b57\u6bb5\u540d\uff01""}" & vbCrLf
				Response.End()
			End If
			UploadType = Code_Int("UploadType",2)
			UploadDir = Code_Admin("UploadDir",1,50)
			If UploadDir = "" And (UploadType = 1 Or UploadType = 2) Then
				Response.Write "{""code"":0,""msg"":""\u5f53\u5f00\u653e\u4e0a\u4f20\u529f\u80fd\u65f6\uff0c\u9700\u8981\u586b\u5199\u4e0a\u4f20\u76ee\u5f55\u540d\uff01""}" & vbCrLf
				Response.End()
			End If
			'网站Html部分
			IsChangeCreateHtml = False
			If CBool(Code_Int("IsCreateHtml",0)) <> IsCreateHtml Then IsChangeCreateHtml = True
			IsCreateHtml = False
			If Code_Int("IsCreateHtml",0)=1 Then
				IsCreateHtml = True
				If ModuleType<>1 And ModuleType<>2 And ModuleType<>3 And ModuleType<>4 And ModuleType<>6 And ModuleType<>7 And ModuleType<>8 And ModuleType<>9 And ModuleType<>10 And ModuleType<>11 And ModuleType<>12 And ModuleType<>14 And ModuleType<>15 Then
					Response.Write "{""code"":0,""msg"":""\u76ee\u524d\u6b64\u7c7b\u9891\u9053\u6682\u4e0d\u652f\u6301HTML\u751f\u6210\uff01""}" & vbCrLf
					Response.End()
				End If
			End If
			HtmlExtName = Code_Admin("HtmlExtName",1,20)
			HtmlPrefix = Code_Admin("HtmlPrefix",1,20)
			HtmlPath = Code_Int("HtmlPath",0)
			HtmlForm = Code_Int("HtmlForm",0)
			MaxFileSize = Code_Int("MaxFileSize",1024)
			PicWidth = Code_Int("PicWidth",120)
			PicHeight = Code_Int("PicHeight",90)
			Tmp1=Replace(Code_Admin("Channel_Power",1,0)," ","")
			If Len(Tmp1)>0 Then
				Tmp1=Replace(Tmp1,",",".")
				ChannelPower=ChannelPower&Tmp1
			End If
			If Right(ChannelPower,1)="." Then ChannelPower=Left(ChannelPower,Len(ChannelPower)-1)

			Tmp2=Replace(Code_Admin("Channel_PHidden",1,0)," ","")
			If Len(Tmp2)>0 Then
				Tmp2=Replace(Tmp2,",",".")
				ChannelPHidden=ChannelPHidden&Tmp2
			End If
			If Right(ChannelPHidden,1)="." Then ChannelPHidden=Left(ChannelPHidden,Len(ChannelPHidden)-1)
			For Sii = 0 To 19
				ChannelSetup = ChannelSetup & Code_Int("ChannelSetup_"&Sii,0)
			Next

			For Each ChannelCuteNums In Request.form("ChannelCuteNum")
				ChannelCuteNum = ChannelCuteNum & Replace(ChannelCuteNums,"@@@","") & "@@@"
			Next
			If Right(ChannelCuteNum,3) = "@@@" Then ChannelCuteNum = Left(ChannelCuteNum,Len(ChannelCuteNum)-3)

			For Each ChannelRewards In Request.form("ChannelReward")
				ChannelReward = ChannelReward & Replace(ChannelRewards,"@@@","") & "@@@"
			Next
			If Right(ChannelReward,3) = "@@@" Then ChannelReward = Left(ChannelReward,Len(ChannelReward)-3)
			If ChannelReward = "" Then ChannelReward = "0@@@0@@@0@@@0"

			For Each ChannelDatess In Request.form("ChannelDates")
				ChannelDates = ChannelDates & Replace(ChannelDatess,"@@@","") & "@@@"
			Next
			If Right(ChannelDates,3) = "@@@" Then ChannelDates = Left(ChannelDates,Len(ChannelDates)-3)
			If ChannelDates = "" Then ChannelDates = "0@@@0@@@0@@@0"

			For Each ChannelPositions In Request.form("ChannelPosition")
				ChannelPosition = ChannelPosition & Replace(ChannelPositions,"@@@","") & "@@@"
			Next
			If Right(ChannelPosition,3) = "@@@" Then ChannelPosition = Left(ChannelPosition,Len(ChannelPosition)-3)
			If ChannelPosition = "" Then ChannelPosition = "0@@@0@@@0@@@0@@@0@@@0"

			For Each ChannelListNums In Request.form("ChannelListNum")
				ChannelListNum = ChannelListNum & Replace(ChannelListNums,"@@@","") & "@@@"
			Next
			If Right(ChannelListNum,3) = "@@@" Then ChannelListNum = Left(ChannelListNum,Len(ChannelListNum)-3)

			For Each UpFileTypes In Request.form("UpFileType")
				UpFileType = UpFileType & Replace(UpFileTypes,"@@@","") & "@@@"
			Next
			If Right(UpFileType,3) = "@@@" Then UpFileType = Left(UpFileType,Len(UpFileType)-3)
			
			If FoundErr = True Then
				Exit Sub
			End If

			Sql = "Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID
			Call Exe_Conn(Rs,Sql,3)
				Rs("ChannelName") = ChannelName
				Rs("ChannelPicUrl") = ChannelPicUrl
				Rs("ChannelRemark") = ChannelRemark
				Rs("ChannelColor") = ChannelColor
				Rs("ChannelBold") = ChannelBold
				Rs("ChannelOpenType") = ChannelOpenType
				Rs("ChannelHidden") = ChannelHidden
				Rs("ChannelType") = ChannelType
				Rs("ChannelTit") = ChannelTit
				Rs("ChannelUnit") = ChannelUnit
				Rs("ChannelListNum") = ChannelListNum
				Rs("CuteNum") = ChannelCuteNum
				Rs("ChannelDates") = ChannelDates
				Rs("ChannelReward") = ChannelReward
				Rs("LeftCuteNum") = ChannelLeftCuteNum
				Rs("ShowName") = ShowName
				Rs("ClassDepth") = ClassDepth
				Rs("ChannelPosition") = ChannelPosition
				Rs("UploadType") = UploadType
				Rs("UploadDir") = UploadDir
				Rs("MaxFileSize") = MaxFileSize
				Rs("RssField") = RssField
				Rs("PicWidth") = PicWidth
				Rs("PicHeight") = PicHeight
				Rs("ChannelSetup") = ChannelSetup
				Rs("UpFileType") = UpFileType
				Rs("ChannelPower") = ChannelPower
				Rs("ChannelPHidden") = ChannelPHidden
				Rs("IsCreateHtml") = IsCreateHtml
				Rs("HtmlExtName") = HtmlExtName
				Rs("HtmlPrefix") = HtmlPrefix
				Rs("HtmlPath")= HtmlPath
				Rs("HtmlForm") = HtmlForm
				Rs("Moban") = Moban
				Rs("SkinID") = SkinID
				Rs("TemplateID") = TemplateID
			Rs.Update
			Rs.Close
			If IsChangeCreateHtml Then 
				'Response.Write IsConfirm("成功编辑一个内部模型！注：你已经更改是否生成HTML选项，请更新网站缓存，以保证模型功能的正常运行！请点击确定,需要继续修改点击取消！",AdminFolder & "/Admin/"&strFileName,AdminFolder & "/Admin/" & strFileName & "?Action=Edit&iChannelID="&iChannelID&"")
				Response.Write "{""code"":1,""msg"":""\u6210\u529f\u7f16\u8f91\u4e00\u4e2a\u5185\u90e8\u9891\u9053\uff01\u6ce8\uff1a\u4f60\u5df2\u7ecf\u66f4\u6539\u662f\u5426\u751f\u6210HTML\u9009\u9879\uff0c\u8bf7\u66f4\u65b0\u7f51\u7ad9\u7f13\u5b58\uff0c\u4ee5\u4fdd\u8bc1\u9891\u9053\u529f\u80fd\u7684\u6b63\u5e38\u8fd0\u884c\uff01"",""url"":""?""}" & vbCrLf
				Response.End()
			Else
				'Response.Write IsConfirm("成功编辑一个内部模型！请点击确定,需要继续修改点击取消！",AdminFolder & "/Admin/"&strFileName,AdminFolder & "/Admin/" & strFileName & "?Action=Edit&iChannelID="&iChannelID&"")
				Response.Write "{""code"":1,""msg"":""\u6210\u529f\u7f16\u8f91\u4e00\u4e2a\u5185\u90e8\u9891\u9053\uff01"",""url"":""?""}" & vbCrLf
				Response.End()
			End If
		End If
		Exit Sub
	End If
End Sub

'//* 模型添加 *//
Sub Channel_Add()
	Response.Write "<!DOCTYPE html>" & vbCrLf
	Response.Write "<head>" & vbCrLf
	Response.Write "<title>模型管理</title>" & vbCrlf
	Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
	Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
	Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
	Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
	Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../fonts/font-awesome/css/font-awesome.min.css"" />" & vbCrLf
	Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/global.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<link href='../Style/font.css' rel='stylesheet' type='text/css' />" & vbCrLf
	Response.Write "<script type='text/javascript'>" & vbCrLf
	Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
	Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
	Response.Write "</script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
	Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
	Response.Write "<script type=""text/javascript"" src=""../Plugins/layui/layui.js""></script>" & vbCrLf
	Response.Write "</head>" & vbCrlf
	Response.Write "<body>" & vbCrlf
	Dim tempstr
	tempstr = HtmlRndFileName
	Response.Write "<form class=""layui-form layui-form-pane"" id=""myform"" name=""myform"" action='?Action=SaveAdd' method=post>" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"">" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "<legend>添加模型</legend>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型名称：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input name=""ChannelName"" type=""text"" id=""ChannelName"" size=""30"" maxlength=""30"" value=""" & Code_Html(ChannelName,1,0) & """ lay-verify=""required"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux red"">*</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">打开方式：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type=""radio"" id=""ChannelOpenType"" name=""ChannelOpenType"" value=""no"" title=""原窗口"" checked><input id=""ChannelOpenType"" name=""ChannelOpenType"" type=""radio"" value=""yes"" title=""新窗口"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">禁用模型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelHidden' name='ChannelHidden' value='yes' title=""是""><input type='radio' id='ChannelHidden' name='ChannelHidden' value='no' title=""否"" checked>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">默认模板：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='text' id='Moban' name='Moban' value='" & Moban & "' size='40' maxlength='255' class=""layui-input"" readonly=""readonly"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-input-block"">" & vbCrlf
	Response.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectMoban('" & ChannelID & "','Moban');"">选择模板</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('Moban');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">默认风格：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='text' id='SkinID' name='SkinID' value='" & SkinID & "' size='40' maxlength='255' class=""layui-input"" readonly=""readonly"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-input-block"">" & vbCrlf
	Response.Write "<button type=""button"" class=""layui-btn"" hidefocus=""true"" onclick=""SelectCss('SkinID');"">选择风格</button><button type=""button"" class=""layui-btn layui-btn-danger"" hidefocus=""true"" onclick=""ClearColor('SkinID');"">清空</button>&nbsp;&nbsp;可以为空" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	'Response.Write "<div class=""layui-form-item"">" & vbCrlf
	'Response.Write "<label class=""layui-form-label"">默认框架：</label>" & vbCrlf
	'Response.Write "<div class=""layui-input-label"">" & vbCrlf
	'Response.Write "" & Admin_ShowTemplate_Option(0,"TemplateID",1,0) & "" & vbCrlf
	'Response.Write "</div>" & vbCrlf
	'Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型类型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend><input id=""ChannelType"" name=""ChannelType"" type=""radio"" value='2' title='<font color=blue>外部模型</font>' checked onClick=""ChannelSetting.style.display='none';"" lay-filter='ChannelType'></legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "外部模型指链接到本系统以外的地址中。当此模型准备链接到网站中的其他系统时，请使用这种方式。<br><label class=""layui-form-label"">链接地址：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-block"">" & vbCrlf
	Response.Write "<input name='LinkUrl' id='LinkUrl' type='text' value='' size='40' maxlength='200' lay-verify=""LinkUrl"" class='layui-input'>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend><input id=""ChannelType"" name=""ChannelType"" type=""radio"" value='1' title='<font color=blue>系统内部模型</font>' onClick=""ChannelSetting.style.display='';"" lay-filter='ChannelType'></legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<font class=red>请慎重选择，模型一旦添加后就不能再更改模型类型。</font><br>系统内部模型指的是在本系统现有功能模块（新闻、文章、下载等）基础上添加新的模型，新模型具备和所使用功能模块完全相同的功能。此功能需要服务器支持FSO才可用。" & vbCrlf
	Response.Write "<div class=""admin-main fadeInUp animated"" id='ChannelSetting' style='display:none;'>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "<legend>内部模型参数设置</legend>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">功能模块：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<div id=""ModuleType_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:80px;""><input type=""text"" ztype=""select"" id=""ModuleType"" name=""ModuleType"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:80px;position:absolute;z-index:-1;"" onchange=""if (this.value>0){CloneConfig.style.display='';} else {CloneConfig.style.display='none';}"" value=""0"" startvalue=""0""/><input type=""text"" id=""ModuleType_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:80px;"" /><a id=""ModuleType_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""ModuleType_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""ModuleType_ul"" style=""left:-1px; width:-1px;""><script>Combox_ModuleType_Init=function(){var _el=Zving.getDom('ModuleType');if(_el._components){return true;}var  _data=[];var  _DataSource;_data.push(['0','自定义']);"
	Call Exec(Rs,"select ChannelID,ChannelName from Channel where ChannelType=0 order by ChannelID asc",2)
	Do while not Rs.eof
	Response.Write "_data.push(['" & rs("ChannelID") & "','" & rs("ChannelName") & "']);"
	Rs.MoveNext
	Loop
	Set Rs=Nothing
	Response.Write "var combox_ModuleType = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_ModuleType_Init();}else{Zving.Page.onReady(Combox_ModuleType_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=red>请慎重选择，模型一旦添加后就不能修改此项。</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id=""CloneConfig"" style=""display:none;"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">克隆参数：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type='checkbox' id='CloneFile' name='CloneFile' value='yes' checked title='克隆文件'>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型目录：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelDir' name='ChannelDir' type='text' value='' size='20' maxlength='50' onblur=""$('#UploadDir').val('Upload_'+$('#ChannelDir').val());"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>&nbsp;*&nbsp;请慎重录入，添加后不能再修改此项。</font><br><font class=red>只能是英文，不能带空格或“\”、“/”等符号。</font><br><font class=blue>样例：</font>Article、Photo、Down</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">模型简称：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelTit' name='ChannelTit' value='' type='text' size='20' maxlength='10' lay-verify=""ChannelTit"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux"">例：“文章”或“教程”</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">项目单位：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelUnit' name='ChannelUnit' value='' type='text' size='10' maxlength='30' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>例如：“篇”、“条”、“个”</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field layui-field-title"">" & vbCrlf
	Response.Write "<legend>内部模型其他参数</legend>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<font class=red>以下设置不是每个模型都需要的，请谨慎选择配置。比如“文章”不使用下列某些参数。</font>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend>模型调用数量：</legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">首页显示数</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='10' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">分页显示数</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='20' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">RSS显示数</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='ChannelListNum' name='ChannelListNum' type='number' min=""0"" value='20' size='15' maxlength='50' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend>列表截断字符数：</legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">左边信息：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelLeftCuteNum' name='ChannelLeftCuteNum' value='15' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">首页信息：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='30' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">分页列表</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='30' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">内容页信息</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='ChannelCuteNum' name='ChannelCuteNum' value='30' type='number' min=""0"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>设置为 0 时不截断</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend>图片大小（宽高）：</legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">宽度：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='PicWidth' name='PicWidth' value='120' type='number' min=""1"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux"">像素</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">高度：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='PicHeight' name='PicHeight' value='90' type='number' min=""1"" size='10' maxlength=3 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux"">像素</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">评论功能：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type=""radio"" id=""ChannelSetup_2"" name=""ChannelSetup_2"" value='1' title='是' checked><input type=""radio"" id=""ChannelSetup_2"" name=""ChannelSetup_2"" value='0' title='否'>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">Rss功能：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type=""radio"" id=""ChannelSetup_6"" name=""ChannelSetup_6"" value='1' title='是' lay-filter='ChannelSetup_6' onClick=""RssFields.style.display=''""><input type=""radio"" id=""ChannelSetup_6"" name=""ChannelSetup_6"" value='0' title='否' lay-filter='ChannelSetup_6' checked onClick=""RssFields.style.display='none'"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id='RssFields' style='display:none;'>" & vbCrlf
	Response.Write "<label class=""layui-form-label"">Rss字段：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='RssField' name='RssField' type='text' value='ID,Name,UserName,Tim' size=30 maxlength='50' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">不健康字符</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_8' name='ChannelSetup_8' value='1' title='是' checked><input type='radio' id='ChannelSetup_8' name='ChannelSetup_8' value='0' title='否'>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">生成HTML</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type=""radio"" id=""IsCreateHtml"" name=""IsCreateHtml"" value=""0"" title=""不生成"" lay-filter='IsCreateHtml' checked onClick=""DisPlayHtml()""><input type=""radio"" id=""IsCreateHtml"" name=""IsCreateHtml"" value=""1"" title=""生成"" lay-filter='IsCreateHtml' onClick=""DisPlayHtml2()"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id=""HtmlTrue1"" style='display:none'>" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">扩展名：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type=""text"" id=""HtmlExtName"" name=""HtmlExtName"" size=""10"" value="".html"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>* 如：“.html”，“.htm”，“.shtml”，“.asp”</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id=""HtmlTrue2"" style='display:none'>" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">前缀：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type=""text"" id=""HtmlPrefix"" name=""HtmlPrefix"" size=""10"" value=""Article_"" class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>* 格式如：“Article_12345.html”，“Article_list123_1.html”</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id=""HtmlTrue3"" style='display:none'>" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">路径格式：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<div id=""HtmlPath_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:120px;""><input type=""text"" ztype=""select"" id=""HtmlPath"" name=""HtmlPath"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:120px;position:absolute;z-index:-1;"" onchange=""chkselect(options[selectedIndex].value,'know2');"" value=""0"" startvalue=""0""/><input type=""text"" id=""HtmlPath_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:120px;"" /><a id=""HtmlPath_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""HtmlPath_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""HtmlPath_ul"" style=""left:-1px; width:-1px;""><script>Combox_HtmlPath_Init=function(){var _el=Zving.getDom('HtmlPath');if(_el._components){return true;}var  _data=[];var  _DataSource;"
	Response.Write "_data.push(['0','不使用日期目录']);"
	Response.Write "_data.push(['1','" & ShowDatePath(tempstr,1) & "']);"
	Response.Write "_data.push(['2','" & ShowDatePath(tempstr,2) & "']);"
	Response.Write "_data.push(['3','" & ShowDatePath(tempstr,3) & "']);"
	Response.Write "_data.push(['4','" & ShowDatePath(tempstr,4) & "']);"
	Response.Write "_data.push(['5','" & ShowDatePath(tempstr,5) & "']);"
	Response.Write "_data.push(['6','" & ShowDatePath(tempstr,6) & "']);"
	Response.Write "_data.push(['7','" & ShowDatePath(tempstr,7) & "']);"
	Response.Write "_data.push(['8','" & ShowDatePath(tempstr,8) & "']);"
	Response.Write "var combox_HtmlPath = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_HtmlPath_Init();}else{Zving.Page.onReady(Combox_HtmlPath_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>此目录是根据添加内容的日期生成，相对于各栏目目录下面</font><div id=""know2"" style=""color: red;font-weight:bold;"">不使用日期目录,HTML文件将保存到栏目目录下面<br>" & InstallDir & "文章/栏目目录/" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"" id=""HtmlTrue4"" style='display:none'>" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">格式：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<div id=""HtmlForm_outer"" ztype=""select"" class=""z-combox"" style=""display:inline-block; *zoom: 1;*display: inline;vertical-align:middle;height:auto;width:auto;position:relative;border:none 0;margin:0;padding:0;white-space: nowrap;"" _style=""width:120px;""><input type=""text"" ztype=""select"" id=""HtmlForm"" name=""HtmlForm"" tabindex=""-1"" autocomplete=""off"" class=""inputText"" style=""width:120px;position:absolute;z-index:-1;"" onchange=""chkselect(options[selectedIndex].value,'know1');"" value=""0"" startvalue=""0""/><input type=""text"" id=""HtmlForm_textField"" autocomplete=""off"" class=""inputText"" style=""vertical-align:middle; cursor:default;width:120px;"" /><a id=""HtmlForm_spinner"" class=""z-combox-spinner"" style=""position:relative; left:-17px; margin-right:-15px; cursor:pointer; width:13px; height:15px;vertical-align:middle;""><b></b></a><div id=""HtmlForm_list"" class=""optgroup"" style=""text-align:left;display:none;""><div id=""HtmlForm_ul"" style=""left:-1px; width:-1px;""><script>Combox_HtmlForm_Init=function(){var _el=Zving.getDom('HtmlForm');if(_el._components){return true;}var  _data=[];var  _DataSource;"
	Response.Write "_data.push(['0','日期和时间']);"
	Response.Write "_data.push(['1','文章ID']);"
	Response.Write "_data.push(['2','文件前缀+文章ID']);"
	Response.Write "_data.push(['3','日期+文章ID']);"
	Response.Write "_data.push(['4','随机数+文章ID']);"
	Response.Write "var combox_HtmlForm = new Zving.Selector({el:_el,data:_data,DataSource:_DataSource});};if(Zving.Page.isReady){Combox_HtmlForm_Init();}else{Zving.Page.onReady(Combox_HtmlForm_Init);}</script></div></div></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><div id=""know1"" style=""color: red;font-weight:bold;"">" & ReadFileName(tempstr,9988,".html","Article_",0,"") & "</div></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div id=""Issubport0"" style=""display:none"">" & ReadFileName(tempstr,9988,".html","Article_",0,"") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport1"" style=""display:none"">" & ReadFileName(tempstr,9988,".html","Article_",1,"") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport2"" style=""display:none"">" & ReadFileName(tempstr,9988,".html","Article_",2,"") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport3"" style=""display:none"">" & ReadFileName(tempstr,9988,".html","Article_",3,"") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport4"" style=""display:none"">" & ReadFileName(tempstr,9988,".html","Article_",4,"") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport5"" style=""display:none"">不使用日期目录,HTML文件将保存到栏目目录下面<br>" & InstallDir & "文章/栏目目录/" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport6"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,1) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport7"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,2) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport8"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,3) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport9"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,4) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport10"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,5) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport11"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,6) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport12"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,7) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<div id=""Issubport13"" style=""display:none"">" & InstallDir & "文章/栏目目录/" & ShowDatePath(tempstr,8) & "" & ReadFileName(tempstr,9988,".html","Article_","","") & "</div>" & vbCrlf
	Response.Write "<script language=""javascript"" type=""text/javascript"">" & vbCrlf
	Response.Write "<!--" & vbCrlf
	Response.Write "function chkselect(s,divid)" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "var divname='Issubport';" & vbCrlf
	Response.Write "var chkreport;" & vbCrlf
	Response.Write "s=Number(s)" & vbCrlf
	Response.Write "if (divid==""know1"")" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "divname=divname+s;" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "if (divid==""know2"")" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "s+=5;" & vbCrlf
	Response.Write "divname=divname+s;" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "document.getElementById(divid).innerHTML=divname;" & vbCrlf
	Response.Write "chkreport=document.getElementById(divname).innerHTML;" & vbCrlf
	Response.Write "document.getElementById(divid).innerHTML=chkreport;" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "function DisPlayHtml()" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "HtmlTrue1.style.display='none'" & vbCrlf
	Response.Write "HtmlTrue2.style.display='none'" & vbCrlf
	Response.Write "HtmlTrue3.style.display='none'" & vbCrlf
	Response.Write "HtmlTrue4.style.display='none'" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "function DisPlayHtml2()" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "HtmlTrue1.style.display=''" & vbCrlf
	Response.Write "HtmlTrue2.style.display=''" & vbCrlf
	Response.Write "HtmlTrue3.style.display=''" & vbCrlf
	Response.Write "HtmlTrue4.style.display=''" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "function DisPlayUpload()" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "UploadTrue1.style.display='none'" & vbCrlf
	Response.Write "UploadTrue2.style.display='none'" & vbCrlf
	Response.Write "UploadTrue3.style.display='none'" & vbCrlf
	Response.Write "UploadTrue4.style.display='none'" & vbCrlf
	Response.Write "UploadTrue5.style.display='none'" & vbCrlf
	Response.Write "UploadTrue6.style.display='none'" & vbCrlf
	Response.Write "UploadTrue7.style.display='none'" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "function DisPlayUpload2()" & vbCrlf
	Response.Write "{" & vbCrlf
	Response.Write "UploadTrue1.style.display=''" & vbCrlf
	Response.Write "UploadTrue2.style.display=''" & vbCrlf
	Response.Write "UploadTrue3.style.display=''" & vbCrlf
	Response.Write "UploadTrue4.style.display=''" & vbCrlf
	Response.Write "UploadTrue5.style.display=''" & vbCrlf
	Response.Write "UploadTrue6.style.display=''" & vbCrlf
	Response.Write "UploadTrue7.style.display=''" & vbCrlf
	Response.Write "}" & vbCrlf
	Response.Write "//-->" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">上传限制：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UploadType' name='UploadType' type='radio' value='0' title=""关闭"" lay-filter='UploadType' onClick=""UploadTrue.style.display='none'""><input type='radio' id='UploadType' name='UploadType' value='1' title=""开启"" lay-filter='UploadType' checked onClick=""UploadTrue.style.display=''"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"" id='UploadTrue'>" & vbCrlf
	Response.Write "<legend>上传限制：</legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">保存目录：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UploadDir' name='UploadDir' type='text' value='Upload_" & rand_num(4) & "' size='20' maxlength=20 class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">水印功能：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_11' name='ChannelSetup_11' value='1' title=""是"" checked><input type='radio' id='ChannelSetup_11' name='ChannelSetup_11' value='0' title=""否"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">远程图片：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_12' name='ChannelSetup_12' value='1' title=""是"" checked><input type='radio' id='ChannelSetup_12' name='ChannelSetup_12' value='0' title=""否"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>仅限 HTML 编辑时使用</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">首张图片：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_17' name='ChannelSetup_17' value='1' title=""是"" checked><input type='radio' id='ChannelSetup_17' name='ChannelSetup_17' value='0' title=""否"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>仅限 HTML 编辑时使用</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">命名形式：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_15' name='ChannelSetup_15' value='1' title=""重命名"" checked><input type='radio' id='ChannelSetup_15' name='ChannelSetup_15' value='0' title=""原名"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>重命名则按年月日时分秒+随机数命名。</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">自动目录：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input type='radio' id='ChannelSetup_16' name='ChannelSetup_16' value='1' title=""使用"" checked><input type='radio' id='ChannelSetup_16' name='ChannelSetup_16' value='0' title=""不使用"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font class=red>如使用则按“年月日”栏目，需FSO支持。</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<div class=""layui-inline"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">文件大小：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-inline"">" & vbCrlf
	Response.Write "<input id='MaxFileSize' name='MaxFileSize' type='text' value='1024' size='10' maxlength='10' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-input-t layui-word-aux"">" & vbCrlf
	Response.Write "KB" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-mid layui-word-aux""><font color=blue>提示：1 KB = 1024 Byte，1 MB = 1024 KB</font></div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<fieldset class=""layui-elem-field"">" & vbCrlf
	Response.Write "<legend>文件类型：</legend>" & vbCrlf
	Response.Write "<div class=""layui-field-box"">" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">图片类型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='png|jpg|jpeg|gif|bmp' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">Flash文件：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='swf' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">多媒体文件</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='flv|swf|mkv|avi|rm|rmvb|mpeg|mpg|ogg|ogv|mov|wmv|mp4|webm|mp3|wav|mid' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">其他文件：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='rar|zip|tar|gz|7z|bz2|cab|iso|doc|docx|xls|xlsx|ppt|pptx|pdf|txt|md|xml' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<div class=""layui-form-item"">" & vbCrlf
	Response.Write "<label class=""layui-form-label"">远程类型：</label>" & vbCrlf
	Response.Write "<div class=""layui-input-4"">" & vbCrlf
	Response.Write "<input id='UpFileType' name='UpFileType' type='text' value='png|jpg|jpeg|gif|bmp' size='30' maxlength='200' class=""layui-input"">" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</fieldset>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "</div>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write "<br>" & vbCrlf
	Response.Write Submit_Layui("提交添加","重新填写","确认要清空对话框内容？","var index=parent.layer.getFrameIndex(window.name);parent.layer.close(index);","关闭","") & vbCrlf
	Response.Write "</form>" & vbCrlf
	Response.Write "<script>" & vbCrlf
	Response.Write "layui.use(['form'], function () {" & vbCrlf
	Response.Write "    var form = layui.form;" & vbCrlf
	Response.Write "    //自定义表单验证" & vbCrlf
	Response.Write "    form.verify({" & vbCrlf
	Response.Write "        ChannelTit: function (value, item) {" & vbCrlf
 	Response.Write "            if($(""input:radio[name='ChannelType']:checked"").val()==1) {" & vbCrlf
	Response.Write "                if (!value){" & vbCrlf
	Response.Write "                    item.focus();" & vbCrlf
	Response.Write "                    return ""频道简称不能为空！"";" & vbCrlf
 	Response.Write "                }" & vbCrlf
 	Response.Write "            }" & vbCrlf
	Response.Write "        }," & vbCrlf
	Response.Write "        LinkUrl: function (value, item) {" & vbCrlf
 	Response.Write "            if($(""input:radio[name='ChannelType']:checked"").val()==2) {" & vbCrlf
	Response.Write "                if (!value){" & vbCrlf
	Response.Write "                    item.focus();" & vbCrlf
	Response.Write "                    return ""链接地址不能为空！"";" & vbCrlf
 	Response.Write "                }" & vbCrlf
 	Response.Write "            }" & vbCrlf
	Response.Write "        }," & vbCrlf
	Response.Write "    })" & vbCrLf
	Response.Write "    //监听 模型类型" & vbCrlf
	Response.Write "    form.on('radio(ChannelType)', function(data){" & vbCrlf
	Response.Write "        if(data.value==2){" & vbCrlf
	Response.Write "            ChannelSetting.style.display='none';" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            ChannelSetting.style.display='';" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //监听 Rss功能" & vbCrlf
	Response.Write "    form.on('radio(ChannelSetup_6)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            RssFields.style.display='';" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            RssFields.style.display='none';" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //监听 生成HTML" & vbCrlf
	Response.Write "    form.on('radio(IsCreateHtml)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            DisPlayHtml2();" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            DisPlayHtml();" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //监听 上传限制" & vbCrlf
	Response.Write "    form.on('radio(UploadType)', function(data){" & vbCrlf
	Response.Write "        if(data.value==1){" & vbCrlf
	Response.Write "            UploadTrue.style.display='';" & vbCrlf
	Response.Write "        }else{" & vbCrlf
	Response.Write "            UploadTrue.style.display='none';" & vbCrlf
	Response.Write "        }" & vbCrlf
	Response.Write "    });" & vbCrlf
	Response.Write "    //提交监听" & vbCrlf
	Response.Write "    form.on('submit(submit)', function (data) {" & vbCrlf
	Response.Write "        loading = layer.load(1, {shade: [0.1,'#fff']});" & vbCrlf
	Response.Write "        $.ajax({" & vbCrLf
	Response.Write "            type: 'post'," & vbCrLf
	Response.Write "            url: '?Action=SaveAdd'," & vbCrLf
	Response.Write "            data: $(data.form).serialize()," & vbCrLf
	Response.Write "            dataType: 'json'," & vbCrLf
	Response.Write "            success: function(res) {" & vbCrLf
	Response.Write "                layer.close(loading);" & vbCrlf
	Response.Write "                if(res.code > 0){" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 1, time: 1000},function(){" & vbCrlf
	Response.Write "                        layer.closeAll(""iframe"");" & vbCrlf
	Response.Write "                        //刷新父页面" & vbCrlf
	Response.Write "                        parent.location.reload();" & vbCrlf
	Response.Write "                    });" & vbCrlf
	Response.Write "                }else{" & vbCrlf
	Response.Write "                    layer.msg(res.msg,{icon: 2, time: 1000});" & vbCrlf
	Response.Write "                }" & vbCrlf
	Response.Write "            }" & vbCrLf
	Response.Write "        });" & vbCrLf
	Response.Write "    });" & vbCrlf
	Response.Write "});" & vbCrlf
	Response.Write "</script>" & vbCrlf
	Response.Write "</body>" & vbCrLf & "</html>"
End Sub

Sub SaveAdd()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim ChannelName, ChannelPicUrl, ChannelRemark, ChannelColor, ChannelBold, ChannelOpenType, ChannelHidden, ChannelType
		Dim ChannelOrder, ChannelOption,rsChannel,sqlChannel,Moban, SkinID, TemplateID
		Dim LinkUrl, ModuleType, ChannelDir, ChannelDataName, ChannelTit, ChannelUnit, ChannelListNum, ShowName, ChannelSetup
		Dim ChannelCuteNum, ChannelLeftCuteNum, ChannelPosition, ChannelReward, ChannelDates
		Dim ChannelCuteNums, ChannelListNums, ChannelPositions, ChannelRewards, ChannelDatess
		Dim ClassDepth, RssField
		Dim UploadType, UploadDir, MaxFileSize, UpFileType
		Dim PicHeight, PicWidth
		Dim Sii, UpFileTypes
		Dim ChannelPower,j,Tmp_Power
		Dim ChannelPHidden,i,Tmp_PHidden,IsCreateHtml, HtmlExtName, HtmlPrefix, HtmlPath , HtmlForm
		ChannelName = Code_Admin("ChannelName",1,20)
		If ChannelName = "" Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u586b\u5199\u9891\u9053\u540d\u79f0\uff01""}" & vbCrLf
			Response.End()
		End If
		Moban=Trim(Request.Form("Moban"))
		SkinID=Trim(Request.Form("SkinID"))
		TemplateID=Trim(Request.Form("TemplateID"))
		If TemplateID = "" Then TemplateID = 0
		ChannelPicUrl = Code_Admin("ChannelPicUrl",1,200)
		ChannelRemark = Code_Admin("ChannelRemark",1,200)
		ChannelColor = Code_Admin("ChannelColor",1,6)
		If ChannelColor <> "" And Len(ChannelColor) <> 6 Then
			Response.Write "{""code"":0,""msg"":""\u8bf7\u6b63\u786e\u586b\u5199\u83dc\u5355\u663e\u793a\u989c\u8272\uff0c\u53ea\u80fd\u4e3a6\u4f4d\u6570 RGB \u989c\u8272\u4ee3\u7801\uff01""}" & vbCrLf
			Response.End()
		End If
		ChannelBold = False
		If Code_Form("ChannelBold") = "yes" Then ChannelBold = True
		ChannelOpenType = False
		If Code_Form("ChannelOpenType") = "yes" Then ChannelOpenType = True
		ChannelHidden = False
		If Code_Form("ChannelHidden") = "yes" Then ChannelHidden = True
		ChannelType = Code_Int("ChannelType",1)
		ModuleType = Trim(Code_Form("ModuleType"))

		ChannelOrder = 0
		Sql = "Select Top 1 ChannelOrder From ["&Data_Name&"] Order By ChannelOrder Desc"
		Call Exec(Rs,Sql,2)
		If Not(Rs.Eof) Then ChannelOrder = Rs(0)+1
		Rs.Close

		If ChannelType = 2 Then
			LinkUrl = Code_Admin("LinkUrl",1,200)
			If LinkUrl = "" Then
				Response.Write "{""code"":0,""msg"":""\u5916\u90e8\u9891\u9053\u8bf7\u586b\u5199\u94fe\u63a5\u5730\u5740\uff01""}" & vbCrLf
				Response.End()
			End If
			If FoundErr = True Then
				Exit Sub
			End If
			ChannelID = GetNewID(Data_Name, "ChannelID")
			Sql = "Select * From ["&Data_Name&"]"
			Call Exe_Conn(Rs,Sql,3)
			Rs.AddNew
				Rs("ChannelID") = ChannelID
				Rs("ChannelName") = ChannelName
				Rs("ChannelPicUrl") = ChannelPicUrl
				Rs("ChannelRemark") = ChannelRemark
				Rs("ChannelColor") = ChannelColor
				Rs("ChannelBold") = ChannelBold
				Rs("ChannelOpenType") = ChannelOpenType
				Rs("ChannelHidden") = ChannelHidden
				Rs("ChannelType") = ChannelType
				Rs("LinkUrl") = LinkUrl
				Rs("ChannelOrder") = ChannelOrder
				Rs("ChannelPower") = ChannelPower
				Rs("ChannelPHidden") = ChannelPHidden
			Rs.Update
			Rs.Close
			'Response.Write IsConfirm("成功添加一个新的外部模型！请点击确定,需要继续修改点击取消！",AdminFolder & "/Admin/"&strFileName,AdminFolder & "/Admin/" & strFileName & "?Action=Add")
			Response.Write "{""code"":1,""msg"":""\u6210\u529f\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5916\u90e8\u9891\u9053\uff01"",""url"":""?""}" & vbCrLf
			Response.End()
		Else
			ChannelDir = Code_Admin("ChannelDir",1,50)
			If ChannelDir="" Then ChannelDir = Get_PinYin(ChannelName)
			If ChannelDir = "" Or InStr(ChannelDir,"/") <> 0 Or InStr(ChannelDir,"\") <> 0 Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u76ee\u5f55\u5fc5\u987b\u586b\u5199\uff01\u5e76\u4e14\u4e0d\u80fd\u542b\u6709\u201c\/\u201d\u4e0e\u201c\\\u201d\u5b57\u7b26\uff01""}" & vbCrLf
				Response.End()
			End If
			RssField = Code_Admin("RssField",1,50)
			If RssField = "" And Code_Int("ChannelSetup_6",0) = 1 Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u652f\u6301 RSS \u65f6\uff0c\u9700\u8981\u586b\u5199 Rss \u5b57\u6bb5\u540d\uff01""}" & vbCrLf
				Response.End()
			End If
			UploadType = Code_Int("UploadType",2)
			UploadDir = Code_Admin("UploadDir",1,50)
			If UploadDir = "" Then UploadDir = ChannelDir
			If UploadDir = "" And (UploadType = 1 Or UploadType = 2) Then
				Response.Write "{""code"":0,""msg"":""\u5f53\u5f00\u653e\u4e0a\u4f20\u529f\u80fd\u65f6\uff0c\u9700\u8981\u586b\u5199\u4e0a\u4f20\u76ee\u5f55\u540d\uff01""}" & vbCrLf
				Response.End()
			End If
			'网站Html部分
			IsChangeCreateHtml = False
			If CBool(Code_Int("IsCreateHtml",0)) <> IsCreateHtml Then IsChangeCreateHtml = True
			IsCreateHtml = False
			If Code_Int("IsCreateHtml",0)=1 Then 
				IsCreateHtml = True
				If ModuleType<>1 And ModuleType<>2 And ModuleType<>3 And ModuleType<>4 And ModuleType<>6 And ModuleType<>7 And ModuleType<>8 And ModuleType<>9 And ModuleType<>10 And ModuleType<>11 And ModuleType<>12 And ModuleType<>14 And ModuleType<>15 Then
					Response.Write "{""code"":0,""msg"":""\u76ee\u524d\u6b64\u7c7b\u9891\u9053\u6682\u4e0d\u652f\u6301HTML\u751f\u6210\uff01""}" & vbCrLf
					Response.End()
				End If
			End If
			HtmlExtName = Code_Admin("HtmlExtName",1,20)
			HtmlPrefix = Code_Admin("HtmlPrefix",1,20)
			HtmlPath = Code_Int("HtmlPath",0)
			HtmlForm = Code_Int("HtmlForm",0)
			Dim TmpCls,TmpDir,TmpDirs
			Set TmpCls = New Cls_FileSystem
			TmpDir = TmpCls.Get_FolderList(InstallDir)
			TmpDirs = TmpCls.Get_FolderList(InstallDir&UploadSetting(1))
			Set TmpCls = Nothing
			If Instr("|"&TmpDir&"|","|"&LCase(ChannelDir)&"|")<>0 Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff01""}" & vbCrLf
				Response.End()
			End If

			If Instr("|"&TmpDirs&"|","|"&LCase(UploadDir)&"|")<>0 Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u4e0a\u4f20\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff01""}" & vbCrLf
				Response.End()
			End If
			
			ChannelTit = Code_Admin("ChannelTit",1,10)
			If ChannelTit = "" Then
				Response.Write "{""code"":0,""msg"":""\u9891\u9053\u7b80\u79f0\u5fc5\u987b\u586b\u5199\uff01""}" & vbCrLf
				Response.End()
			End If
			ModuleType = Code_Int("ModuleType",1)
			TmpDir = ""
			Select Case ModuleType
			Case 0
			ModuleType=0
			Case Else
			sqlChannel="select * from Channel where ModuleType="&ModuleType
			Call Exec(rsChannel,SqlChannel,2)
			If rsChannel.BOF And rsChannel.EOF Then
				Response.Write "{""code"":0,""msg"":""\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u9891\u9053\uff01""}" & vbCrLf
				Response.End()
			Else
				TmpDir=rsChannel("ChannelDir")
				ModuleType=rsChannel("ModuleType")
				ChannelOption=rsChannel("ChannelOption")
			rsChannel.Close
			Set rsChannel = Nothing
			End If
			End Select

			ChannelDataName = ChannelDir
			ChannelUnit = Code_Admin("ChannelUnit",1,20)
			ChannelLeftCuteNum = Code_Int("ChannelLeftCuteNum",15)
			ShowName = False
			If Code_Form("ShowName") = "yes" Then ShowName = True
			ClassDepth = Code_Int("ClassDepth",0)
			PicWidth = Code_Int("PicWidth",120)
			PicHeight = Code_Int("PicHeight",90)
			MaxFileSize = Code_Int("MaxFileSize",1024)
			Tmp_Power=Replace(Code_Admin("Channel_Power",1,0)," ","")
			If Len(Tmp_Power)>0 Then
				Tmp_Power=Replace(Tmp_Power,",",".")
				ChannelPower=ChannelPower&Tmp_Power
			End If
			Tmp_PHidden=Replace(Code_Admin("Channel_PHidden",1,0)," ","")
			If Len(Tmp_PHidden)>0 Then
				Tmp_PHidden=Replace(Tmp_PHidden,",",".")
				ChannelPHidden=ChannelPHidden&Tmp_PHidden
			End If
			For Sii = 0 To 19
				ChannelSetup = ChannelSetup & Code_Int("ChannelSetup_"&Sii,0)
			Next
			For Each ChannelCuteNums In Request.form("ChannelCuteNum")
				ChannelCuteNum = ChannelCuteNum & Replace(ChannelCuteNums,"@@@","") & "@@@"
			Next
			If Right(ChannelCuteNum,3) = "@@@" Then ChannelCuteNum = Left(ChannelCuteNum,Len(ChannelCuteNum)-3)

			For Each ChannelRewards In Request.form("ChannelReward")
				ChannelReward = ChannelReward & Replace(ChannelRewards,"@@@","") & "@@@"
			Next
			If Right(ChannelReward,3) = "@@@" Then ChannelReward = Left(ChannelReward,Len(ChannelReward)-3)
			If ChannelReward = "" Then ChannelReward = "0@@@0@@@0@@@0"

			For Each ChannelDatess In Request.form("ChannelDates")
				ChannelDates = ChannelDates & Replace(ChannelDatess,"@@@","") & "@@@"
			Next
			If Right(ChannelDates,3) = "@@@" Then ChannelDates = Left(ChannelDates,Len(ChannelDates)-3)
			If ChannelDates = "" Then ChannelDates = "0@@@0@@@0@@@0"

			For Each ChannelPositions In Request.form("ChannelPosition")
				ChannelPosition = ChannelPosition & Replace(ChannelPositions,"@@@","") & "@@@"
			Next
			If Right(ChannelPosition,3) = "@@@" Then ChannelPosition = Left(ChannelPosition,Len(ChannelPosition)-3)
			If ChannelPosition = "" Then ChannelPosition = "0@@@0@@@0@@@0@@@0@@@0"

			For Each ChannelListNums In Request.form("ChannelListNum")
				ChannelListNum = ChannelListNum & Replace(ChannelListNums,"@@@","") & "@@@"
			Next
			If Right(ChannelListNum,3) = "@@@" Then ChannelListNum = Left(ChannelListNum,Len(ChannelListNum)-3)

			For Each UpFileTypes In Request.form("UpFileType")
				UpFileType = UpFileType & Replace(UpFileTypes,"@@@","") & "@@@"
			Next
			If Right(UpFileType,3) = "@@@" Then UpFileType = Left(UpFileType,Len(UpFileType)-3)
			If FoundErr = True Then
				Exit Sub
			End If
			
			ChannelID = GetNewID(Data_Name, "ChannelID")
			Sql = "Select * From ["&Data_Name&"]"
			Call Exe_Conn(Rs,Sql,3)
			Rs.AddNew
				Rs("ChannelID") = ChannelID
				Rs("ChannelName") = ChannelName
				Rs("ChannelPicUrl") = ChannelPicUrl
				Rs("ChannelRemark") = ChannelRemark
				Rs("ChannelColor") = ChannelColor
				Rs("ChannelBold") = ChannelBold
				Rs("ChannelOpenType") = ChannelOpenType
				Rs("ChannelHidden") = ChannelHidden
				Rs("ChannelType") = ChannelType
				Rs("ChannelOrder") = ChannelOrder
				Rs("ModuleType") = ModuleType
				Rs("ChannelDir") = ChannelDir
				Rs("ChannelTit") = ChannelTit
				Rs("ChannelReward") = ChannelReward
				Rs("ChannelDates") = ChannelDates
				Rs("ChannelDataName") = ChannelDataName
				Rs("ChannelUnit") = ChannelUnit
				Rs("ChannelListNum") = ChannelListNum
				Rs("ChannelPosition") = ChannelPosition
				Rs("CuteNum") = ChannelCuteNum
				Rs("LeftCuteNum") = ChannelLeftCuteNum
				Rs("ShowName") = ShowName
				Rs("ClassDepth") = ClassDepth
				Rs("UploadType") = UploadType
				Rs("PicWidth") = PicWidth
				Rs("RssField") = RssField
				Rs("PicHeight") = PicHeight
				Rs("UploadDir") = UploadDir
				Rs("MaxFileSize") = MaxFileSize
				Rs("ChannelSetup") = ChannelSetup
				Rs("UpFileType") = UpFileType
				Rs("ChannelPower") = ChannelPower
				Rs("ChannelPHidden") = ChannelPHidden
				Rs("IsCreateHtml") = IsCreateHtml
				Rs("HtmlExtName") = HtmlExtName
				Rs("HtmlPrefix") = HtmlPrefix
				Rs("HtmlPath") = HtmlPath
				Rs("HtmlForm")	= HtmlForm
				Rs("Moban") = Moban
				Rs("SkinID") = SkinID
				Rs("TemplateID") = TemplateID
			Rs.Update
			Rs.Close
			If TmpDir<>"" And Code_Form("CloneFile")="yes" Then
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"','"&ChannelTit&"频道模板',7)",0)
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"/index.html','"&ChannelTit&"首页',1)",0)
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"/list.html','"&ChannelTit&"列表',2)",0)
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"/list_pic.html','"&ChannelTit&"图片列表',2)",0)
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"/search.html','"&ChannelTit&"搜索',4)",0)
				MobanID = GetNewID("Moban", "MobanID")
				Call Exec("","insert into Moban (MobanID,MobanName,MobanGetName,MobanType)values("&MobanID&",'"&ChannelDir&"/view.html','"&ChannelTit&"浏览',3)",0)
				'--- 克隆文件开始
				Dim m, mAdmin, TmpFileList, TmpFileListIndex, TmpFileListList, TmpFileListView, TmpFileListAdmin
				Set TmpCls = New Cls_FileSystem
				TmpFileList = TmpCls.Get_FileList(InstallDir & TmpDir)
				TmpFileList = Split(TmpFileList,"|")
				TmpFileListAdmin = TmpCls.Get_FileList(InstallDir & AdminFolder & "\" & TmpDir)
				TmpFileListAdmin = Split(TmpFileListAdmin,"|")
				TmpFileListTemplates = TmpCls.Get_FileList(InstallDir & TemplateDir & TmpDir)
				TmpFileListTemplates = Split(TmpFileListTemplates,"|")
				If ChannelDir = "" Or Not IsArray(TmpFileList) Or Not IsArray(TmpFileListAdmin) Or Not IsArray(TmpFileListTemplates) Then
					Set TmpCls = Nothing
					Response.Write IsSuccess("克隆源模型有错误！或者克隆模型目录设置错误！<br>无法完成克隆文件任务！",AdminFolder & "/Admin/"&strFileName)
					Exit Sub
				End If
				Call TmpCls.Make_Dir(InstallDir & ChannelDir)
				Call TmpCls.Make_Dir(InstallDir & ChannelDir & "\Images")
				Call TmpCls.Make_Dir(InstallDir & AdminFolder & "\" & ChannelDir)
				Call TmpCls.Make_Dir(InstallDir & TemplateDir & ChannelDir)
				Call Copy_Data(TmpDir,ChannelDir)
				For m = 0 To Ubound(TmpFileList)
					Call TmpCls.Copy_File(InstallDir & TmpDir & "\" & TmpFileList(m),InstallDir & ChannelDir & "\" & TmpFileList(m))
				Next
				Erase TmpFileList
				If ModuleType>18 Then
					Call TmpCls.Copy_File(InstallDir & AdminFolder & "\" & "Images\Admin_left_"&ModuleType&".gif",InstallDir & AdminFolder & "\Images\Admin_left_"&ChannelID&".gif")
				End If
				For mAdmin = 0 To Ubound(TmpFileListAdmin)
					Call TmpCls.Copy_File(InstallDir & AdminFolder & "\" & TmpDir & "\" & TmpFileListAdmin(mAdmin),InstallDir & AdminFolder & "\" & ChannelDir & "\" & TmpFileListAdmin(mAdmin))
				Next
				Erase TmpFileListAdmin
				For mTemplates = 0 To Ubound(TmpFileListTemplates)
					Call TmpCls.Copy_File(InstallDir & TemplateDir & TmpDir & "\" & TmpFileListTemplates(mTemplates),InstallDir & TemplateDir & ChannelDir & "\" & TmpFileListTemplates(mTemplates))
				Next
				Erase TmpFileListTemplates
				TmpFileList = LoadFile(InstallDir & ChannelDir & "\" & "Channel_Config.asp")
				TmpFileList = Replace(TmpFileList,ModuleType,ChannelID)
				WriteTOFile InstallDir & ChannelDir & "\" & "Channel_Config.asp",TmpFileList
				TmpFileListIndex = LoadFile(InstallDir & ChannelDir & "\" & "Index.asp")
				TmpFileListIndex = Replace(TmpFileListIndex,"Channel_" & TmpDir,"Channel_" & ChannelDir)
				WriteTOFile InstallDir & ChannelDir & "\" & "Index.asp",TmpFileListIndex
				TmpFileListList = LoadFile(InstallDir & ChannelDir & "\" & "List.asp")
				TmpFileListList = Replace(TmpFileListList,"Channel_" & TmpDir,"Channel_" & ChannelDir)
				WriteTOFile InstallDir & ChannelDir & "\" & "List.asp",TmpFileListList
				TmpFileListView = LoadFile(InstallDir & ChannelDir & "\" & "Search.asp")
				TmpFileListView = Replace(TmpFileListView,"Channel_" & TmpDir,"Channel_" & ChannelDir)
				WriteTOFile InstallDir & ChannelDir & "\" & "Search.asp",TmpFileListView
				TmpFileListView = LoadFile(InstallDir & ChannelDir & "\" & "View.asp")
				TmpFileListView = Replace(TmpFileListView,"Channel_" & TmpDir,"Channel_" & ChannelDir)
				WriteTOFile InstallDir & ChannelDir & "\" & "View.asp",TmpFileListView
				TmpFileListHits = LoadFile(InstallDir & ChannelDir & "\" & "Hits.asp")
				TmpFileListHits = Replace(TmpFileListHits,"Channel_" & TmpDir,"Channel_" & ChannelDir)
				WriteTOFile InstallDir & ChannelDir & "\" & "Hits.asp",TmpFileListHits
				TmpFileListAdmin = LoadFile(InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Channel_Config.asp")
				TmpFileListAdmin = Replace(TmpFileListAdmin,ModuleType,ChannelID)
				WriteTOFile InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Channel_Config.asp",TmpFileListAdmin
				Call TmpCls.Make_File(InstallDir & ChannelDir & "\" & "Channel_"&TmpDir&".asp",InstallDir & ChannelDir & "\" & "Channel_"&ChannelDir&".asp")
				Call TmpCls.Make_File(InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_"&TmpDir&".asp",InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_"&ChannelDir&".asp")
				Call TmpCls.Make_File(InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_Create"&TmpDir&".asp",InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_Create"&ChannelDir&".asp")
				If TmpCls.Chk_Exist(InstallDir & ChannelDir & "\" & "Index.html",1) Then Call TmpCls.Del_File(InstallDir & ChannelDir & "\" & "Index.html")
				Set TmpCls = Nothing
				If IsCreateHtml=True Then
					menustatus = 1
				Else
					menustatus = 0
				End If
				If ModuleType=1 Then
					AuthID = GetNewID("Admin_Auth", "AuthID")
					pid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"管理','"&ChannelDir&"','1','1','0','icon-list','0','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"列表','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','"&ChannelDir&"/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','"&ChannelDir&"/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','"&ChannelDir&"/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','"&ChannelDir&"/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','"&ChannelDir&"/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-还原','"&ChannelDir&"/Restore','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-移动','"&ChannelDir&"/Move','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替换','"&ChannelDir&"/Replace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替存','"&ChannelDir&"/DoReplace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','"&ChannelDir&"/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-审核','"&ChannelDir&"/Passed','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-回收站','"&ChannelDir&"/Recycle','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"栏目','Admin/Admin_Class.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Class/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Class/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Class/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Class/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Class/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','Class/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-合并','Class/Mod','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-整理','Class/Directory','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"来源','Admin/Admin_CopyFrom.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','CopyFrom/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','CopyFrom/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','CopyFrom/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','CopyFrom/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','CopyFrom/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"模板','Admin/Admin_Template.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Template/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Template/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Template/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Template/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Template/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-预览','Template/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"Html生成','"&ChannelDir&"/Admin_Create"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','"&menustatus&"')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-首页','Create/Index','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-栏目','Create/List','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-内容','Create/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				ElseIf ModuleType=2 Then
					AuthID = GetNewID("Admin_Auth", "AuthID")
					pid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"管理','"&ChannelDir&"','1','1','0','icon-image','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"列表','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','"&ChannelDir&"/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','"&ChannelDir&"/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','"&ChannelDir&"/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','"&ChannelDir&"/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','"&ChannelDir&"/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-还原','"&ChannelDir&"/Restore','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-移动','"&ChannelDir&"/Move','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替换','"&ChannelDir&"/Replace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替存','"&ChannelDir&"/DoReplace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','"&ChannelDir&"/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-审核','"&ChannelDir&"/Passed','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-回收站','"&ChannelDir&"/Recycle','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"栏目','Admin/Admin_Class.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Class/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Class/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Class/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Class/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Class/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','Class/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-合并','Class/Mod','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-整理','Class/Directory','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"来源','Admin/Admin_CopyFrom.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','CopyFrom/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','CopyFrom/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','CopyFrom/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','CopyFrom/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','CopyFrom/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"模板','Admin/Admin_Template.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Template/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Template/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Template/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Template/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Template/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-预览','Template/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"Html生成','"&ChannelDir&"/Admin_Create"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','"&menustatus&"')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-首页','Create/Index','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-栏目','Create/List','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-内容','Create/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				ElseIf ModuleType=3 Then
					AuthID = GetNewID("Admin_Auth", "AuthID")
					pid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"管理','"&ChannelDir&"','1','1','0','icon-download','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"列表','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','"&ChannelDir&"/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','"&ChannelDir&"/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','"&ChannelDir&"/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','"&ChannelDir&"/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','"&ChannelDir&"/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-还原','"&ChannelDir&"/Restore','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-移动','"&ChannelDir&"/Move','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替换','"&ChannelDir&"/Replace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替存','"&ChannelDir&"/DoReplace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','"&ChannelDir&"/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-审核','"&ChannelDir&"/Passed','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-回收站','"&ChannelDir&"/Recycle','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"栏目','Admin/Admin_Class.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Class/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Class/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Class/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Class/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Class/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','Class/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-合并','Class/Mod','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-整理','Class/Directory','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"来源','Admin/Admin_CopyFrom.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','CopyFrom/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','CopyFrom/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','CopyFrom/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','CopyFrom/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','CopyFrom/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"模板','Admin/Admin_Template.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Template/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Template/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Template/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Template/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Template/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-预览','Template/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"其他管理','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"&Action=Other','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"Html生成','"&ChannelDir&"/Admin_Create"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','"&menustatus&"')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-首页','Create/Index','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-栏目','Create/List','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-内容','Create/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				ElseIf ModuleType=4 Then
					AuthID = GetNewID("Admin_Auth", "AuthID")
					pid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"管理','"&ChannelDir&"','1','1','0','icon-cart','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"列表','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','"&ChannelDir&"/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','"&ChannelDir&"/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','"&ChannelDir&"/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','"&ChannelDir&"/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','"&ChannelDir&"/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-还原','"&ChannelDir&"/Restore','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-移动','"&ChannelDir&"/Move','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替换','"&ChannelDir&"/Replace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-替存','"&ChannelDir&"/DoReplace','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','"&ChannelDir&"/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-审核','"&ChannelDir&"/Passed','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-回收站','"&ChannelDir&"/Recycle','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"栏目','Admin/Admin_Class.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Class/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Class/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Class/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Class/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Class/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','Class/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-合并','Class/Mod','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-整理','Class/Directory','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"来源','Admin/Admin_CopyFrom.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','CopyFrom/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','CopyFrom/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','CopyFrom/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','CopyFrom/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','CopyFrom/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"模板','Admin/Admin_Template.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Template/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Template/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Template/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Template/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Template/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-预览','Template/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"其他管理','"&ChannelDir&"/Admin_"&ChannelDir&".asp?ChannelID="&ChannelID&"&Action=Other','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'处理今天的订单','"&ChannelDir&"/Admin_Order.asp?SearchType=1','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
					TmpFileListAdmin = LoadFile(InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_Order.asp")
					TmpFileListAdmin = Replace(TmpFileListAdmin,"CheckPurview 26,0","CheckPurview "&AuthID&",0")
					WriteTOFile InstallDir & AdminFolder & "\" & ChannelDir & "\" & "Admin_Order.asp",TmpFileListAdmin
					AuthID = GetNewID("Admin_Auth", "AuthID")
					fid = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"Html生成','"&ChannelDir&"/Admin_Create"&ChannelDir&".asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','"&menustatus&"')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-首页','Create/Index','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-栏目','Create/List','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
					AuthID = GetNewID("Admin_Auth", "AuthID")
					Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'生成-内容','Create/View','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				End If
				'--- 克隆文件结束
			End If
			If ModuleType=0 Then
				AuthID = GetNewID("Admin_Auth", "AuthID")
				pid = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"管理','"&ChannelDir&"','1','1','0','icon-list','0','0','"&Time_Type(now(),1)&"','1')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				fid = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"栏目','Admin/Admin_Class.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','Class/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','Class/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','Class/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','Class/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','Class/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-排序','Class/Order','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-合并','Class/Mod','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-整理','Class/Directory','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				fid = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'"&ChannelTit&"来源','Admin/Admin_CopyFrom.asp?ChannelID="&ChannelID&"','1','1','0','','"&pid&"','0','"&Time_Type(now(),1)&"','1')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添加','CopyFrom/Add','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-添存','CopyFrom/Insert','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-修改','CopyFrom/Edit','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-改存','CopyFrom/Update','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
				AuthID = GetNewID("Admin_Auth", "AuthID")
				Call Exec("","insert into Admin_Auth (AuthID,title,href,type,status,authopen,icon,pid,sort,addtime,menustatus)values("&AuthID&",'操作-删除','CopyFrom/Del','1','1','0','','"&fid&"','0','"&Time_Type(now(),1)&"','0')",0)
			End If
			Dim TmpUP
			Set TmpUP = New Cls_FileSystem
			'--- 附件目录生成开始
			Call TmpUP.Make_Dir(InstallDir&UploadSetting(1)& "\" &UploadDir)
			'--- 附件目录生成结束
			Set TmpUP = Nothing
			If TmpDir<>"" Then
				'--- 克隆配置开始
				Sql = "Select ChannelOption From ["&Data_Name&"] Where ChannelID="&ChannelID
				Call Exe_Conn(Rs,Sql,3)
				Rs("ChannelOption")=ChannelOption
				Rs.Update
				Rs.Close
				'--- 克隆配置结束
			End If
			'Response.Write IsConfirm("成功添加一个新的内部模型！并成功生成模型（"&ChannelName&"）所有文件！请进行模板设置操作！请点击确定,需要继续修改点击取消！",AdminFolder & "/Admin/"&strFileName,AdminFolder & "/Admin/" & strFileName & "?Action=Add")
			Response.Write "{""code"":1,""msg"":""\u6210\u529f\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5185\u90e8\u9891\u9053\uff01\u5e76\u6210\u529f\u751f\u6210\u9891\u9053\uff08"&ChannelName&"\uff09\u6240\u6709\u6587\u4ef6\uff01\u8bf7\u8fdb\u884c\u6a21\u677f\u8bbe\u7f6e\u64cd\u4f5c\uff01"",""url"":""?""}" & vbCrLf
			Response.End()
		End If
		Exit Sub
	End If
End Sub

'//* 模型排序 *//
Sub ListOrder()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		ChannelID = Code_CLng(Trim(Code_Form("ChannelID")))
		ChannelOrder = Code_CLng(Trim(Code_Form("ChannelOrder")))
		Call Exec("","Update ["&Data_Name&"] Set ChannelOrder="&ChannelOrder&" Where ChannelID="&ChannelID,0)
		Response.Write "{""msg"":""\u6392\u5e8f\u6210\u529f\uff01"",""url"":""?"",""code"":1}"
		Response.End()
	End If
End Sub

'//* 模型重新排序 *//
Sub Channel_Order()
	i=1
	Sql = "Select ChannelID From ["&Data_Name&"] Order By ChannelID Asc"
	Call Exec(Rs,Sql,2)
	Do While Not Rs.Eof
		Call Exec("","Update ["&Data_Name&"] Set ChannelOrder="&i&" Where ChannelID="&Rs("ChannelID"),0)
		i=i+1
		Rs.MoveNext
	Loop
	Rs.Close
	Response.Write "{""msg"":""\u6210\u529f\u5bf9\u7f51\u7ad9\u6a21\u578b\u8fdb\u884c\u4e86\u6392\u5e8f\uff01"",""url"":""?"",""code"":1}"
	Response.End()
End Sub

'//* 删除模型 *//
Sub Channel_Delete()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim iChannelID, ChannelName, ChannelOrder
		iChannelID = Code_CLng(Trim(Code_Form("id")))
		Call Exec(Rs,"Select Top 1 ChannelName,ChannelOrder,ChannelDir,ChannelType,ModuleType,UploadDir,ChannelDataName From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
		If Rs.Eof Then
			Rs.Close
			Response.Write "{""code"":0,""msg"":""\u9891\u9053ID\uff08"&iChannelID&"\uff09\u4e0d\u5b58\u5728\uff01""}"
			Response.End()
		End If
		ChannelName = Rs("ChannelName")
		ChannelOrder = Rs("ChannelOrder")
		ChannelDir = Rs("ChannelDir")
		ChannelType = Rs("ChannelType")
		ModuleType = Rs("ModuleType")
		ChannelDataName = Rs("ChannelDataName")
		ChannelUploadDir = Rs("UploadDir")
		Rs.Close
		If Int(ChannelType)=0 Then
			Response.Write "{""code"":0,""msg"":""\u7cfb\u7edf\u6a21\u578b\u4e0d\u80fd\u5220\u9664\uff01""}"
			Response.End()
		End If
		If Int(ChannelType)<>2 Then
			Call Exec("","Delete From {prefix}Class Where ChannelID=" & iChannelID,0)
			Call Exec("","Delete From {prefix}Fieldset Where ChannelID=" & iChannelID,0)
			Call Exec(RsAuth,"Select Top 1 AuthID From [Admin_Auth] Where href='"&ChannelDir&"'",2)
			If RsAuth.BOF And RsAuth.EOF Then
				RsAuth.Close
			Else
				Delete_Auth(RsAuth("AuthID"))
				Call Exec("","Delete From Admin_Auth Where AuthID="&RsAuth("AuthID")&"",0)
				RsAuth.Close
			End If
			If Int(ModuleType)<>0 Then
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "'",0)
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "/index.html'",0)
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "/list.html'",0)
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "/list_pic.html'",0)
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "/search.html'",0)
				Call Exec("","Delete From Moban Where MobanName='" & ChannelDir & "/view.html'",0)
				Dim Cfs
				Set Cfs=New Cls_FileSystem
				Cfs.Del_Folder InstallDir & ChannelDir
				Cfs.Del_Folder InstallDir & AdminFolder & "/" & ChannelDir
				Cfs.Del_Folder InstallDir & TemplateDir & ChannelDir
				Cfs.Del_Folder InstallDir & UploadSetting(1) & "/" & ChannelUploadDir
				Set Cfs=Nothing
				Call Exec("","DROP TABLE "&ChannelDataName,0)
			End If
		End If
		Call Exec("","Delete From ["&Data_Name&"] Where ChannelID="&iChannelID,0)
		Call Exec("","Update ["&Data_Name&"] Set ChannelOrder=ChannelOrder-1 Where ChannelOrder>"&ChannelOrder,0)
		Response.Write "{""code"":1,""msg"":""\u6210\u529f\u5220\u9664\u9891\u9053\uff08"&ChannelName&"\uff09\uff01""}"
		Response.End()
	End If
End Sub

Function Delete_Auth(pid)
	If pid<>"" Then
		Call Exec(RsAuthDel,"Select AuthID From [Admin_Auth] Where pid="&pid&"",2)
		If RsAuthDel.BOF And RsAuthDel.EOF Then
			RsAuthDel.Close
		Else
			Do While Not RsAuthDel.Eof
				Delete_Auth(RsAuthDel("AuthID"))
				Call Exec("","Delete From Admin_Auth Where AuthID="&RsAuthDel("AuthID")&"",0)
				RsAuthDel.MoveNext
			Loop
			RsAuthDel.Close
		End If
	End If
End Function

'//* 删除模型Html *//
Sub Channel_DelHtml()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim iChannelID
		iChannelID = Code_CLng(Trim(Code_Form("id")))
		Call Exec(Rs,"Select Top 1 ChannelName,ChannelDir,HtmlExtName From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
		If Rs.Eof Then
			Rs.Close
			Response.Write "{""code"":0,""msg"":""\u9891\u9053ID\uff08"&iChannelID&"\uff09\u4e0d\u5b58\u5728\uff01""}"
			Response.End()
		End If
		Set Cfs=New Cls_FileSystem
		Cfs.Del_File InstallDir & Rs("ChannelDir")&"/"&"Index"&Rs("HtmlExtName")
		Set Cfs=Nothing
		Response.Write "{""code"":1,""msg"":""\u6210\u529f\u5220\u9664\u9891\u9053\uff08"&Rs("ChannelName")&"\uff09\u9891\u9053\u9996\u9875Html\u6587\u4ef6\uff01""}"
		Rs.Close
		Response.End()
	End If
End Sub

'//* 模型状态 *//
Sub Channel_Status()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim iChannelID
		iChannelID = Code_CLng(Trim(Code_Form("id")))
		Call Exec(Rs,"Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
		If Rs.Eof Then
			Rs.Close
			Response.Write "{""code"":0,""msg"":""\u8bbe\u7f6e\u5931\u8d25!""}"
			Response.End()
		End If
		menustatus = 1
		ChannelHidden = WK_False
		If Trim(Code_Form("status")) = "0" Then ChannelHidden = WK_True
		If Trim(Code_Form("status")) = "0" Then menustatus = 0
		Call Exec(RsAuth,"Select Top 1 AuthID From [Admin_Auth] Where href='"&Rs("ChannelDir")&"'",2)
		If RsAuth.BOF And RsAuth.EOF Then
			RsAuth.Close
		Else
			Call Exec("","Update [Admin_Auth] Set menustatus="&menustatus&" Where AuthID="&RsAuth("AuthID"),0)
			RsAuth.Close
		End If
		Call Exec("","Update ["&Data_Name&"] Set ChannelHidden="&ChannelHidden&" Where ChannelID="&iChannelID,0)
		Response.Write "{""code"":1,""msg"":""\u8bbe\u7f6e\u6210\u529f!""}"
		Response.End()
	End If
End Sub

'//* 模型生成html *//
Sub Channel_CreateHtml()
	If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
		Dim iChannelID
		iChannelID = Code_CLng(Trim(Code_Form("id")))
		Call Exec(Rs,"Select Top 1 * From ["&Data_Name&"] Where ChannelID="&iChannelID,2)
		If Rs.Eof Then
			Rs.Close
			Response.Write "{""code"":0,""msg"":""\u8bbe\u7f6e\u5931\u8d25!""}"
			Response.End()
		End If
		menustatus = 0
		IsCreateHtml = False
		If Trim(Code_Form("IsCreateHtml")) = "1" Then IsCreateHtml = True
		If Trim(Code_Form("IsCreateHtml")) = "1" Then menustatus = 1
		Call Exec(RsAuth,"Select Top 1 AuthID From [Admin_Auth] Where href='"&Rs("ChannelDir")&"/Admin_Create"&Rs("ChannelDir")&".asp?ChannelID="&iChannelID&"'",2)
		If RsAuth.BOF And RsAuth.EOF Then
			RsAuth.Close
		Else
			Call Exec("","Update [Admin_Auth] Set menustatus="&menustatus&" Where AuthID="&RsAuth("AuthID"),0)
			RsAuth.Close
		End If
		Call Exec("","Update ["&Data_Name&"] Set IsCreateHtml="&IsCreateHtml&" Where ChannelID="&iChannelID,0)
		Response.Write "{""code"":1,""msg"":""\u8bbe\u7f6e\u6210\u529f!""}"
		Response.End()
	End If
End Sub
%>